summaryrefslogtreecommitdiffstats
path: root/examples/widgets
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2012-08-17 13:23:19 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-20 12:20:55 +0200
commit806dda08d685bc5f9ed71dfe8b61f21848d48066 (patch)
treea63533a1c4a335ae17adc105abb0ae4e62e2f26e /examples/widgets
parent9f942014e31842b512c3198de035d041c59f54a9 (diff)
Moving .qdoc files under examples/widgets/doc
Updated those .qdoc files to refer to the new relative examples emplacement. Images and snippets to be moved later. Also grouped all widgets related examples under widgets. Change-Id: Ib29696e2d8948524537f53e8dda88f9ee26a597f Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Diffstat (limited to 'examples/widgets')
-rw-r--r--examples/widgets/animation/README8
-rw-r--r--examples/widgets/animation/animatedtiles/animatedtiles.desktop11
-rw-r--r--examples/widgets/animation/animatedtiles/animatedtiles.pro10
-rw-r--r--examples/widgets/animation/animatedtiles/animatedtiles.qrc11
-rw-r--r--examples/widgets/animation/animatedtiles/images/Time-For-Lunch-2.jpgbin0 -> 32471 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/images/centered.pngbin0 -> 892 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/images/ellipse.pngbin0 -> 10767 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/images/figure8.pngbin0 -> 14050 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/images/kinetic.pngbin0 -> 6776 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/images/random.pngbin0 -> 14969 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/images/tile.pngbin0 -> 16337 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/main.cpp256
-rw-r--r--examples/widgets/animation/animation.pro17
-rw-r--r--examples/widgets/animation/appchooser/accessories-dictionary.pngbin0 -> 5396 bytes
-rw-r--r--examples/widgets/animation/appchooser/akregator.pngbin0 -> 4873 bytes
-rw-r--r--examples/widgets/animation/appchooser/appchooser.desktop11
-rw-r--r--examples/widgets/animation/appchooser/appchooser.pro10
-rw-r--r--examples/widgets/animation/appchooser/appchooser.qrc8
-rw-r--r--examples/widgets/animation/appchooser/digikam.pngbin0 -> 3334 bytes
-rw-r--r--examples/widgets/animation/appchooser/k3b.pngbin0 -> 8220 bytes
-rw-r--r--examples/widgets/animation/appchooser/main.cpp173
-rw-r--r--examples/widgets/animation/easing/animation.h100
-rw-r--r--examples/widgets/animation/easing/easing.desktop11
-rw-r--r--examples/widgets/animation/easing/easing.pro17
-rw-r--r--examples/widgets/animation/easing/easing.qrc5
-rw-r--r--examples/widgets/animation/easing/form.ui270
-rw-r--r--examples/widgets/animation/easing/images/qt-logo.pngbin0 -> 5149 bytes
-rw-r--r--examples/widgets/animation/easing/main.cpp54
-rw-r--r--examples/widgets/animation/easing/window.cpp177
-rw-r--r--examples/widgets/animation/easing/window.h76
-rw-r--r--examples/widgets/animation/moveblocks/main.cpp321
-rw-r--r--examples/widgets/animation/moveblocks/moveblocks.desktop11
-rw-r--r--examples/widgets/animation/moveblocks/moveblocks.pro9
-rw-r--r--examples/widgets/animation/states/accessories-dictionary.pngbin0 -> 5396 bytes
-rw-r--r--examples/widgets/animation/states/akregator.pngbin0 -> 4873 bytes
-rw-r--r--examples/widgets/animation/states/digikam.pngbin0 -> 3334 bytes
-rw-r--r--examples/widgets/animation/states/help-browser.pngbin0 -> 6984 bytes
-rw-r--r--examples/widgets/animation/states/k3b.pngbin0 -> 8220 bytes
-rw-r--r--examples/widgets/animation/states/kchart.pngbin0 -> 4887 bytes
-rw-r--r--examples/widgets/animation/states/main.cpp285
-rw-r--r--examples/widgets/animation/states/states.desktop11
-rw-r--r--examples/widgets/animation/states/states.pro10
-rw-r--r--examples/widgets/animation/states/states.qrc10
-rw-r--r--examples/widgets/animation/stickman/animation.cpp189
-rw-r--r--examples/widgets/animation/stickman/animation.h82
-rw-r--r--examples/widgets/animation/stickman/animations/chilling.binbin0 -> 6508 bytes
-rw-r--r--examples/widgets/animation/stickman/animations/dancing.binbin0 -> 2348 bytes
-rw-r--r--examples/widgets/animation/stickman/animations/dead.binbin0 -> 268 bytes
-rw-r--r--examples/widgets/animation/stickman/animations/jumping.binbin0 -> 1308 bytes
-rw-r--r--examples/widgets/animation/stickman/graphicsview.cpp60
-rw-r--r--examples/widgets/animation/stickman/graphicsview.h64
-rw-r--r--examples/widgets/animation/stickman/lifecycle.cpp217
-rw-r--r--examples/widgets/animation/stickman/lifecycle.h80
-rw-r--r--examples/widgets/animation/stickman/main.cpp106
-rw-r--r--examples/widgets/animation/stickman/node.cpp92
-rw-r--r--examples/widgets/animation/stickman/node.h70
-rw-r--r--examples/widgets/animation/stickman/rectbutton.cpp73
-rw-r--r--examples/widgets/animation/stickman/rectbutton.h65
-rw-r--r--examples/widgets/animation/stickman/stickman.cpp337
-rw-r--r--examples/widgets/animation/stickman/stickman.desktop11
-rw-r--r--examples/widgets/animation/stickman/stickman.h103
-rw-r--r--examples/widgets/animation/stickman/stickman.pro23
-rw-r--r--examples/widgets/animation/stickman/stickman.qrc8
-rw-r--r--examples/widgets/animation/sub-attaq/animationmanager.cpp98
-rw-r--r--examples/widgets/animation/sub-attaq/animationmanager.h73
-rw-r--r--examples/widgets/animation/sub-attaq/boat.cpp272
-rw-r--r--examples/widgets/animation/sub-attaq/boat.h95
-rw-r--r--examples/widgets/animation/sub-attaq/boat_p.h232
-rw-r--r--examples/widgets/animation/sub-attaq/bomb.cpp118
-rw-r--r--examples/widgets/animation/sub-attaq/bomb.h67
-rw-r--r--examples/widgets/animation/sub-attaq/data.xml39
-rw-r--r--examples/widgets/animation/sub-attaq/graphicsscene.cpp282
-rw-r--r--examples/widgets/animation/sub-attaq/graphicsscene.h122
-rw-r--r--examples/widgets/animation/sub-attaq/main.cpp57
-rw-r--r--examples/widgets/animation/sub-attaq/mainwindow.cpp82
-rw-r--r--examples/widgets/animation/sub-attaq/mainwindow.h63
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/background.pngbin0 -> 48858 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/boat.pngbin0 -> 5198 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/bomb.pngbin0 -> 760 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step1.pngbin0 -> 5760 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step2.pngbin0 -> 9976 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step3.pngbin0 -> 12411 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step4.pngbin0 -> 15438 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step1.pngbin0 -> 3354 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step2.pngbin0 -> 6205 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step3.pngbin0 -> 6678 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step4.pngbin0 -> 6666 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/submarine.pngbin0 -> 3202 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/surface.pngbin0 -> 575 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/big/torpedo.pngbin0 -> 951 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/scalable/background-n810.svg171
-rw-r--r--examples/widgets/animation/sub-attaq/pics/scalable/background.svg171
-rw-r--r--examples/widgets/animation/sub-attaq/pics/scalable/boat.svg279
-rw-r--r--examples/widgets/animation/sub-attaq/pics/scalable/bomb.svg138
-rw-r--r--examples/widgets/animation/sub-attaq/pics/scalable/sand.svg103
-rw-r--r--examples/widgets/animation/sub-attaq/pics/scalable/see.svg44
-rw-r--r--examples/widgets/animation/sub-attaq/pics/scalable/sky.svg45
-rw-r--r--examples/widgets/animation/sub-attaq/pics/scalable/sub-attaq.svg1473
-rw-r--r--examples/widgets/animation/sub-attaq/pics/scalable/submarine.svg214
-rw-r--r--examples/widgets/animation/sub-attaq/pics/scalable/surface.svg49
-rw-r--r--examples/widgets/animation/sub-attaq/pics/scalable/torpedo.svg127
-rw-r--r--examples/widgets/animation/sub-attaq/pics/small/background.pngbin0 -> 34634 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/small/boat.pngbin0 -> 2394 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/small/bomb.pngbin0 -> 760 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/small/submarine.pngbin0 -> 1338 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/small/surface.pngbin0 -> 502 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/small/torpedo.pngbin0 -> 951 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/welcome/logo-a.pngbin0 -> 5972 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/welcome/logo-a2.pngbin0 -> 5969 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/welcome/logo-b.pngbin0 -> 6869 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/welcome/logo-dash.pngbin0 -> 2255 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/welcome/logo-excl.pngbin0 -> 2740 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/welcome/logo-q.pngbin0 -> 7016 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/welcome/logo-s.pngbin0 -> 5817 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/welcome/logo-t.pngbin0 -> 3717 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/welcome/logo-t2.pngbin0 -> 3688 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pics/welcome/logo-u.pngbin0 -> 5374 bytes
-rw-r--r--examples/widgets/animation/sub-attaq/pixmapitem.cpp76
-rw-r--r--examples/widgets/animation/sub-attaq/pixmapitem.h63
-rw-r--r--examples/widgets/animation/sub-attaq/progressitem.cpp67
-rw-r--r--examples/widgets/animation/sub-attaq/progressitem.h61
-rw-r--r--examples/widgets/animation/sub-attaq/qanimationstate.cpp150
-rw-r--r--examples/widgets/animation/sub-attaq/qanimationstate.h91
-rw-r--r--examples/widgets/animation/sub-attaq/states.cpp330
-rw-r--r--examples/widgets/animation/sub-attaq/states.h180
-rw-r--r--examples/widgets/animation/sub-attaq/sub-attaq.pro42
-rw-r--r--examples/widgets/animation/sub-attaq/subattaq.qrc39
-rw-r--r--examples/widgets/animation/sub-attaq/submarine.cpp182
-rw-r--r--examples/widgets/animation/sub-attaq/submarine.h93
-rw-r--r--examples/widgets/animation/sub-attaq/submarine_p.h137
-rw-r--r--examples/widgets/animation/sub-attaq/textinformationitem.cpp54
-rw-r--r--examples/widgets/animation/sub-attaq/textinformationitem.h55
-rw-r--r--examples/widgets/animation/sub-attaq/torpedo.cpp114
-rw-r--r--examples/widgets/animation/sub-attaq/torpedo.h67
-rw-r--r--examples/widgets/desktop/README10
-rw-r--r--examples/widgets/desktop/desktop.pro11
-rw-r--r--examples/widgets/desktop/screenshot/main.cpp51
-rw-r--r--examples/widgets/desktop/screenshot/screenshot.cpp199
-rw-r--r--examples/widgets/desktop/screenshot/screenshot.desktop11
-rw-r--r--examples/widgets/desktop/screenshot/screenshot.h99
-rw-r--r--examples/widgets/desktop/screenshot/screenshot.pro12
-rw-r--r--examples/widgets/desktop/systray/images/bad.pngbin0 -> 2496 bytes
-rw-r--r--examples/widgets/desktop/systray/images/heart.pngbin0 -> 25780 bytes
-rw-r--r--examples/widgets/desktop/systray/images/trash.pngbin0 -> 12128 bytes
-rw-r--r--examples/widgets/desktop/systray/main.cpp63
-rw-r--r--examples/widgets/desktop/systray/systray.desktop11
-rw-r--r--examples/widgets/desktop/systray/systray.pro14
-rw-r--r--examples/widgets/desktop/systray/systray.qrc7
-rw-r--r--examples/widgets/desktop/systray/window.cpp270
-rw-r--r--examples/widgets/desktop/systray/window.h112
-rw-r--r--examples/widgets/dialogs/README9
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.cpp430
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.desktop11
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.h156
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.pro13
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.qrc11
-rw-r--r--examples/widgets/dialogs/classwizard/images/background.pngbin0 -> 22578 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/banner.pngbin0 -> 3947 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/logo1.pngbin0 -> 1619 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/logo2.pngbin0 -> 1619 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/logo3.pngbin0 -> 1619 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/watermark1.pngbin0 -> 14516 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/watermark2.pngbin0 -> 14912 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/main.cpp63
-rw-r--r--examples/widgets/dialogs/configdialog/configdialog.cpp116
-rw-r--r--examples/widgets/dialogs/configdialog/configdialog.desktop11
-rw-r--r--examples/widgets/dialogs/configdialog/configdialog.h69
-rw-r--r--examples/widgets/dialogs/configdialog/configdialog.pro17
-rw-r--r--examples/widgets/dialogs/configdialog/configdialog.qrc7
-rw-r--r--examples/widgets/dialogs/configdialog/images/config.pngbin0 -> 6758 bytes
-rw-r--r--examples/widgets/dialogs/configdialog/images/query.pngbin0 -> 2116 bytes
-rw-r--r--examples/widgets/dialogs/configdialog/images/update.pngbin0 -> 7890 bytes
-rw-r--r--examples/widgets/dialogs/configdialog/main.cpp52
-rw-r--r--examples/widgets/dialogs/configdialog/pages.cpp151
-rw-r--r--examples/widgets/dialogs/configdialog/pages.h64
-rw-r--r--examples/widgets/dialogs/dialogs.pro19
-rw-r--r--examples/widgets/dialogs/extension/extension.desktop11
-rw-r--r--examples/widgets/dialogs/extension/extension.pro12
-rw-r--r--examples/widgets/dialogs/extension/finddialog.cpp114
-rw-r--r--examples/widgets/dialogs/extension/finddialog.h78
-rw-r--r--examples/widgets/dialogs/extension/main.cpp53
-rw-r--r--examples/widgets/dialogs/findfiles/findfiles.desktop11
-rw-r--r--examples/widgets/dialogs/findfiles/findfiles.pro11
-rw-r--r--examples/widgets/dialogs/findfiles/main.cpp (renamed from examples/widgets/groupbox/main.cpp)0
-rw-r--r--examples/widgets/dialogs/findfiles/window.cpp247
-rw-r--r--examples/widgets/dialogs/findfiles/window.h90
-rw-r--r--examples/widgets/dialogs/licensewizard/images/logo.pngbin0 -> 1810 bytes
-rw-r--r--examples/widgets/dialogs/licensewizard/images/watermark.pngbin0 -> 34998 bytes
-rw-r--r--examples/widgets/dialogs/licensewizard/licensewizard.cpp363
-rw-r--r--examples/widgets/dialogs/licensewizard/licensewizard.desktop11
-rw-r--r--examples/widgets/dialogs/licensewizard/licensewizard.h163
-rw-r--r--examples/widgets/dialogs/licensewizard/licensewizard.pro13
-rw-r--r--examples/widgets/dialogs/licensewizard/licensewizard.qrc6
-rw-r--r--examples/widgets/dialogs/licensewizard/main.cpp63
-rw-r--r--examples/widgets/dialogs/sipdialog/dialog.cpp122
-rw-r--r--examples/widgets/dialogs/sipdialog/dialog.h63
-rw-r--r--examples/widgets/dialogs/sipdialog/main.cpp52
-rw-r--r--examples/widgets/dialogs/sipdialog/sipdialog.desktop11
-rw-r--r--examples/widgets/dialogs/sipdialog/sipdialog.pro15
-rw-r--r--examples/widgets/dialogs/standarddialogs/dialog.cpp471
-rw-r--r--examples/widgets/dialogs/standarddialogs/dialog.h101
-rw-r--r--examples/widgets/dialogs/standarddialogs/main.cpp62
-rw-r--r--examples/widgets/dialogs/standarddialogs/standarddialogs.desktop11
-rw-r--r--examples/widgets/dialogs/standarddialogs/standarddialogs.pro13
-rw-r--r--examples/widgets/dialogs/tabdialog/main.cpp59
-rw-r--r--examples/widgets/dialogs/tabdialog/tabdialog.cpp196
-rw-r--r--examples/widgets/dialogs/tabdialog/tabdialog.desktop11
-rw-r--r--examples/widgets/dialogs/tabdialog/tabdialog.h99
-rw-r--r--examples/widgets/dialogs/tabdialog/tabdialog.pro12
-rw-r--r--examples/widgets/dialogs/trivialwizard/trivialwizard.cpp135
-rw-r--r--examples/widgets/dialogs/trivialwizard/trivialwizard.desktop11
-rw-r--r--examples/widgets/dialogs/trivialwizard/trivialwizard.pro10
-rw-r--r--examples/widgets/doc/addressbook.qdoc442
-rw-r--r--examples/widgets/doc/affine.qdoc48
-rw-r--r--examples/widgets/doc/analogclock.qdoc154
-rw-r--r--examples/widgets/doc/animatedtiles.qdoc36
-rw-r--r--examples/widgets/doc/appchooser.qdoc38
-rw-r--r--examples/widgets/doc/application.qdoc396
-rw-r--r--examples/widgets/doc/basicdrawing.qdoc454
-rw-r--r--examples/widgets/doc/basicgraphicslayouts.qdoc164
-rw-r--r--examples/widgets/doc/basiclayouts.qdoc190
-rw-r--r--examples/widgets/doc/basicsortfiltermodel.qdoc37
-rw-r--r--examples/widgets/doc/blurpicker.qdoc33
-rw-r--r--examples/widgets/doc/borderlayout.qdoc36
-rw-r--r--examples/widgets/doc/boxes.qdoc49
-rw-r--r--examples/widgets/doc/calculator.qdoc375
-rw-r--r--examples/widgets/doc/calendar.qdoc223
-rw-r--r--examples/widgets/doc/calendarwidget.qdoc291
-rw-r--r--examples/widgets/doc/charactermap.qdoc274
-rw-r--r--examples/widgets/doc/chart.qdoc82
-rw-r--r--examples/widgets/doc/chip.qdoc38
-rw-r--r--examples/widgets/doc/classwizard.qdoc190
-rw-r--r--examples/widgets/doc/codeeditor.qdoc197
-rw-r--r--examples/widgets/doc/coloreditorfactory.qdoc155
-rw-r--r--examples/widgets/doc/combowidgetmapper.qdoc167
-rw-r--r--examples/widgets/doc/composition.qdoc44
-rw-r--r--examples/widgets/doc/concentriccircles.qdoc231
-rw-r--r--examples/widgets/doc/configdialog.qdoc36
-rw-r--r--examples/widgets/doc/customsortfiltermodel.qdoc289
-rw-r--r--examples/widgets/doc/deform.qdoc51
-rw-r--r--examples/widgets/doc/diagramscene.qdoc834
-rw-r--r--examples/widgets/doc/digitalclock.qdoc74
-rw-r--r--examples/widgets/doc/dirview.qdoc36
-rw-r--r--examples/widgets/doc/dockwidgets.qdoc163
-rw-r--r--examples/widgets/doc/dragdroprobot.qdoc365
-rw-r--r--examples/widgets/doc/dynamiclayouts.qdoc34
-rw-r--r--examples/widgets/doc/easing.qdoc37
-rw-r--r--examples/widgets/doc/editabletreemodel.qdoc446
-rw-r--r--examples/widgets/doc/elasticnodes.qdoc430
-rw-r--r--examples/widgets/doc/elidedlabel.qdoc162
-rw-r--r--examples/widgets/doc/embeddeddialogs.qdoc37
-rw-r--r--examples/widgets/doc/eventtransitions.qdoc72
-rw-r--r--examples/widgets/doc/extension.qdoc138
-rw-r--r--examples/widgets/doc/factorial.qdoc88
-rw-r--r--examples/widgets/doc/fademessage.qdoc37
-rw-r--r--examples/widgets/doc/fetchmore.qdoc111
-rw-r--r--examples/widgets/doc/findfiles.qdoc249
-rw-r--r--examples/widgets/doc/flowlayout.qdoc145
-rw-r--r--examples/widgets/doc/fontsampler.qdoc35
-rw-r--r--examples/widgets/doc/frozencolumn.qdoc133
-rw-r--r--examples/widgets/doc/gradients.qdoc55
-rw-r--r--examples/widgets/doc/groupbox.qdoc140
-rw-r--r--examples/widgets/doc/icons.qdoc780
-rw-r--r--examples/widgets/doc/imagecomposition.qdoc165
-rw-r--r--examples/widgets/doc/imageviewer.qdoc326
-rw-r--r--examples/widgets/doc/interview.qdoc37
-rw-r--r--examples/widgets/doc/licensewizard.qdoc218
-rw-r--r--examples/widgets/doc/lighting.qdoc33
-rw-r--r--examples/widgets/doc/lineedits.qdoc161
-rw-r--r--examples/widgets/doc/mainwindow.qdoc36
-rw-r--r--examples/widgets/doc/mdi.qdoc37
-rw-r--r--examples/widgets/doc/menus.qdoc218
-rw-r--r--examples/widgets/doc/moveblocks.qdoc214
-rw-r--r--examples/widgets/doc/movie.qdoc39
-rw-r--r--examples/widgets/doc/orderform.qdoc364
-rw-r--r--examples/widgets/doc/padnavigator.qdoc583
-rw-r--r--examples/widgets/doc/painterpaths.qdoc418
-rw-r--r--examples/widgets/doc/pathstroke.qdoc47
-rw-r--r--examples/widgets/doc/pingpong.qdoc93
-rw-r--r--examples/widgets/doc/pixelator.qdoc255
-rw-r--r--examples/widgets/doc/recentfiles.qdoc36
-rw-r--r--examples/widgets/doc/rogue.qdoc208
-rw-r--r--examples/widgets/doc/screenshot.qdoc247
-rw-r--r--examples/widgets/doc/scribble.qdoc417
-rw-r--r--examples/widgets/doc/sdi.qdoc36
-rw-r--r--examples/widgets/doc/shapedclock.qdoc131
-rw-r--r--examples/widgets/doc/simpledommodel.qdoc280
-rw-r--r--examples/widgets/doc/simpletreemodel.qdoc333
-rw-r--r--examples/widgets/doc/simplewidgetmapper.qdoc125
-rw-r--r--examples/widgets/doc/sipdialog.qdoc127
-rw-r--r--examples/widgets/doc/sliders.qdoc255
-rw-r--r--examples/widgets/doc/spinboxdelegate.qdoc141
-rw-r--r--examples/widgets/doc/spinboxes.qdoc191
-rw-r--r--examples/widgets/doc/spreadsheet.qdoc37
-rw-r--r--examples/widgets/doc/standarddialogs.qdoc35
-rw-r--r--examples/widgets/doc/stardelegate.qdoc296
-rw-r--r--examples/widgets/doc/states.qdoc36
-rw-r--r--examples/widgets/doc/stickman.qdoc102
-rw-r--r--examples/widgets/doc/styles.qdoc472
-rw-r--r--examples/widgets/doc/stylesheet.qdoc36
-rw-r--r--examples/widgets/doc/sub-attaq.qdoc40
-rw-r--r--examples/widgets/doc/syntaxhighlighter.qdoc252
-rw-r--r--examples/widgets/doc/tabdialog.qdoc134
-rw-r--r--examples/widgets/doc/tablet.qdoc369
-rw-r--r--examples/widgets/doc/tetrix.qdoc431
-rw-r--r--examples/widgets/doc/textedit.qdoc36
-rw-r--r--examples/widgets/doc/tooltips.qdoc394
-rw-r--r--examples/widgets/doc/trafficlight.qdoc85
-rw-r--r--examples/widgets/doc/transformations.qdoc371
-rw-r--r--examples/widgets/doc/trivialwizard.qdoc82
-rw-r--r--examples/widgets/doc/twowaybutton.qdoc68
-rw-r--r--examples/widgets/doc/wiggly.qdoc167
-rw-r--r--examples/widgets/doc/windowflags.qdoc216
-rw-r--r--examples/widgets/draganddrop/README9
-rw-r--r--examples/widgets/draganddrop/delayedencoding/delayedencoding.desktop11
-rw-r--r--examples/widgets/draganddrop/draganddrop.pro13
-rw-r--r--examples/widgets/draganddrop/draggableicons/draggableicons.desktop11
-rw-r--r--examples/widgets/draganddrop/draggableicons/draggableicons.pro12
-rw-r--r--examples/widgets/draganddrop/draggableicons/draggableicons.qrc7
-rw-r--r--examples/widgets/draganddrop/draggableicons/dragwidget.cpp168
-rw-r--r--examples/widgets/draganddrop/draggableicons/dragwidget.h65
-rw-r--r--examples/widgets/draganddrop/draggableicons/images/boat.pngbin0 -> 2772 bytes
-rw-r--r--examples/widgets/draganddrop/draggableicons/images/car.pngbin0 -> 2963 bytes
-rw-r--r--examples/widgets/draganddrop/draggableicons/images/house.pngbin0 -> 3292 bytes
-rw-r--r--examples/widgets/draganddrop/draggableicons/main.cpp61
-rw-r--r--examples/widgets/draganddrop/draggabletext/draggabletext.desktop11
-rw-r--r--examples/widgets/draganddrop/draggabletext/draggabletext.pro15
-rw-r--r--examples/widgets/draganddrop/draggabletext/draggabletext.qrc5
-rw-r--r--examples/widgets/draganddrop/draggabletext/draglabel.cpp51
-rw-r--r--examples/widgets/draganddrop/draggabletext/draglabel.h58
-rw-r--r--examples/widgets/draganddrop/draggabletext/dragwidget.cpp165
-rw-r--r--examples/widgets/draganddrop/draggabletext/dragwidget.h62
-rw-r--r--examples/widgets/draganddrop/draggabletext/main.cpp52
-rw-r--r--examples/widgets/draganddrop/draggabletext/words.txt41
-rw-r--r--examples/widgets/draganddrop/dropsite/droparea.cpp126
-rw-r--r--examples/widgets/draganddrop/dropsite/droparea.h77
-rw-r--r--examples/widgets/draganddrop/dropsite/dropsite.desktop11
-rw-r--r--examples/widgets/draganddrop/dropsite/dropsite.pro14
-rw-r--r--examples/widgets/draganddrop/dropsite/dropsitewindow.cpp143
-rw-r--r--examples/widgets/draganddrop/dropsite/dropsitewindow.h77
-rw-r--r--examples/widgets/draganddrop/dropsite/main.cpp53
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/draglabel.cpp89
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/draglabel.h64
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/dragwidget.cpp212
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/dragwidget.h65
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/fridgemagnets.desktop11
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/fridgemagnets.pro15
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/fridgemagnets.qrc5
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/main.cpp61
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/words.txt48
-rw-r--r--examples/widgets/draganddrop/puzzle/example.jpgbin0 -> 42654 bytes
-rw-r--r--examples/widgets/draganddrop/puzzle/main.cpp54
-rw-r--r--examples/widgets/draganddrop/puzzle/mainwindow.cpp152
-rw-r--r--examples/widgets/draganddrop/puzzle/mainwindow.h76
-rw-r--r--examples/widgets/draganddrop/puzzle/pieceslist.cpp121
-rw-r--r--examples/widgets/draganddrop/puzzle/pieceslist.h63
-rw-r--r--examples/widgets/draganddrop/puzzle/puzzle.desktop11
-rw-r--r--examples/widgets/draganddrop/puzzle/puzzle.pro23
-rw-r--r--examples/widgets/draganddrop/puzzle/puzzle.qrc5
-rw-r--r--examples/widgets/draganddrop/puzzle/puzzlewidget.cpp214
-rw-r--r--examples/widgets/draganddrop/puzzle/puzzlewidget.h89
-rw-r--r--examples/widgets/effects/blurpicker/blureffect.cpp68
-rw-r--r--examples/widgets/effects/blurpicker/blureffect.h66
-rw-r--r--examples/widgets/effects/blurpicker/blurpicker.cpp161
-rw-r--r--examples/widgets/effects/blurpicker/blurpicker.desktop11
-rw-r--r--examples/widgets/effects/blurpicker/blurpicker.h75
-rw-r--r--examples/widgets/effects/blurpicker/blurpicker.pro11
-rw-r--r--examples/widgets/effects/blurpicker/blurpicker.qrc14
-rw-r--r--examples/widgets/effects/blurpicker/images/README.txt5
-rw-r--r--examples/widgets/effects/blurpicker/images/accessories-calculator.pngbin0 -> 3760 bytes
-rw-r--r--examples/widgets/effects/blurpicker/images/accessories-text-editor.pngbin0 -> 4746 bytes
-rw-r--r--examples/widgets/effects/blurpicker/images/background.jpgbin0 -> 16259 bytes
-rw-r--r--examples/widgets/effects/blurpicker/images/help-browser.pngbin0 -> 5392 bytes
-rw-r--r--examples/widgets/effects/blurpicker/images/internet-group-chat.pngbin0 -> 2809 bytes
-rw-r--r--examples/widgets/effects/blurpicker/images/internet-mail.pngbin0 -> 3899 bytes
-rw-r--r--examples/widgets/effects/blurpicker/images/internet-web-browser.pngbin0 -> 6376 bytes
-rw-r--r--examples/widgets/effects/blurpicker/images/office-calendar.pngbin0 -> 4010 bytes
-rw-r--r--examples/widgets/effects/blurpicker/images/system-users.pngbin0 -> 5353 bytes
-rw-r--r--examples/widgets/effects/blurpicker/main.cpp55
-rw-r--r--examples/widgets/effects/effects.pro14
-rw-r--r--examples/widgets/effects/fademessage/README.txt2
-rw-r--r--examples/widgets/effects/fademessage/background.jpgbin0 -> 159108 bytes
-rw-r--r--examples/widgets/effects/fademessage/fademessage.cpp128
-rw-r--r--examples/widgets/effects/fademessage/fademessage.desktop11
-rw-r--r--examples/widgets/effects/fademessage/fademessage.h70
-rw-r--r--examples/widgets/effects/fademessage/fademessage.pro18
-rw-r--r--examples/widgets/effects/fademessage/fademessage.qrc5
-rw-r--r--examples/widgets/effects/fademessage/main.cpp55
-rw-r--r--examples/widgets/effects/lighting/lighting.cpp139
-rw-r--r--examples/widgets/effects/lighting/lighting.desktop11
-rw-r--r--examples/widgets/effects/lighting/lighting.h70
-rw-r--r--examples/widgets/effects/lighting/lighting.pro11
-rw-r--r--examples/widgets/effects/lighting/main.cpp55
-rw-r--r--examples/widgets/graphicsview/README9
-rw-r--r--examples/widgets/graphicsview/anchorlayout/anchorlayout.desktop11
-rw-r--r--examples/widgets/graphicsview/anchorlayout/anchorlayout.pro13
-rw-r--r--examples/widgets/graphicsview/anchorlayout/main.cpp129
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/basicgraphicslayouts.desktop11
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro14
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/basicgraphicslayouts.qrc5
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/images/block.pngbin0 -> 2146 bytes
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.cpp130
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/layoutitem.h65
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/main.cpp58
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/window.cpp90
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/window.h57
-rw-r--r--examples/widgets/graphicsview/boxes/3rdparty/fbm.c207
-rw-r--r--examples/widgets/graphicsview/boxes/3rdparty/fbm.h40
-rw-r--r--examples/widgets/graphicsview/boxes/basic.fsh73
-rw-r--r--examples/widgets/graphicsview/boxes/basic.vsh61
-rw-r--r--examples/widgets/graphicsview/boxes/boxes.pro39
-rw-r--r--examples/widgets/graphicsview/boxes/boxes.qrc25
-rw-r--r--examples/widgets/graphicsview/boxes/cubemap_negx.jpgbin0 -> 41060 bytes
-rw-r--r--examples/widgets/graphicsview/boxes/cubemap_negy.jpgbin0 -> 15520 bytes
-rw-r--r--examples/widgets/graphicsview/boxes/cubemap_negz.jpgbin0 -> 68911 bytes
-rw-r--r--examples/widgets/graphicsview/boxes/cubemap_posx.jpgbin0 -> 74915 bytes
-rw-r--r--examples/widgets/graphicsview/boxes/cubemap_posy.jpgbin0 -> 24193 bytes
-rw-r--r--examples/widgets/graphicsview/boxes/cubemap_posz.jpgbin0 -> 57881 bytes
-rw-r--r--examples/widgets/graphicsview/boxes/dotted.fsh66
-rw-r--r--examples/widgets/graphicsview/boxes/fresnel.fsh79
-rw-r--r--examples/widgets/graphicsview/boxes/glass.fsh76
-rw-r--r--examples/widgets/graphicsview/boxes/glbuffers.cpp402
-rw-r--r--examples/widgets/graphicsview/boxes/glbuffers.h366
-rw-r--r--examples/widgets/graphicsview/boxes/glextensions.cpp98
-rw-r--r--examples/widgets/graphicsview/boxes/glextensions.h202
-rw-r--r--examples/widgets/graphicsview/boxes/gltrianglemesh.h91
-rw-r--r--examples/widgets/graphicsview/boxes/granite.fsh76
-rw-r--r--examples/widgets/graphicsview/boxes/main.cpp150
-rw-r--r--examples/widgets/graphicsview/boxes/marble.fsh71
-rw-r--r--examples/widgets/graphicsview/boxes/parameters.par5
-rw-r--r--examples/widgets/graphicsview/boxes/qt-logo.jpgbin0 -> 40886 bytes
-rw-r--r--examples/widgets/graphicsview/boxes/qt-logo.pngbin0 -> 13923 bytes
-rw-r--r--examples/widgets/graphicsview/boxes/qtbox.cpp480
-rw-r--r--examples/widgets/graphicsview/boxes/qtbox.h118
-rw-r--r--examples/widgets/graphicsview/boxes/reflection.fsh54
-rw-r--r--examples/widgets/graphicsview/boxes/refraction.fsh70
-rw-r--r--examples/widgets/graphicsview/boxes/roundedbox.cpp161
-rw-r--r--examples/widgets/graphicsview/boxes/roundedbox.h72
-rw-r--r--examples/widgets/graphicsview/boxes/scene.cpp1085
-rw-r--r--examples/widgets/graphicsview/boxes/scene.h245
-rw-r--r--examples/widgets/graphicsview/boxes/smiley.pngbin0 -> 14508 bytes
-rw-r--r--examples/widgets/graphicsview/boxes/square.jpgbin0 -> 14542 bytes
-rw-r--r--examples/widgets/graphicsview/boxes/trackball.cpp160
-rw-r--r--examples/widgets/graphicsview/boxes/trackball.h79
-rw-r--r--examples/widgets/graphicsview/boxes/wood.fsh70
-rw-r--r--examples/widgets/graphicsview/chip/chip.cpp183
-rw-r--r--examples/widgets/graphicsview/chip/chip.h68
-rw-r--r--examples/widgets/graphicsview/chip/chip.pro21
-rw-r--r--examples/widgets/graphicsview/chip/fileprint.pngbin0 -> 1456 bytes
-rw-r--r--examples/widgets/graphicsview/chip/images.qrc10
-rw-r--r--examples/widgets/graphicsview/chip/main.cpp57
-rw-r--r--examples/widgets/graphicsview/chip/mainwindow.cpp109
-rw-r--r--examples/widgets/graphicsview/chip/mainwindow.h68
-rw-r--r--examples/widgets/graphicsview/chip/qt4logo.pngbin0 -> 48333 bytes
-rw-r--r--examples/widgets/graphicsview/chip/rotateleft.pngbin0 -> 1754 bytes
-rw-r--r--examples/widgets/graphicsview/chip/rotateright.pngbin0 -> 1732 bytes
-rw-r--r--examples/widgets/graphicsview/chip/view.cpp279
-rw-r--r--examples/widgets/graphicsview/chip/view.h104
-rw-r--r--examples/widgets/graphicsview/chip/zoomin.pngbin0 -> 1622 bytes
-rw-r--r--examples/widgets/graphicsview/chip/zoomout.pngbin0 -> 1601 bytes
-rw-r--r--examples/widgets/graphicsview/collidingmice/collidingmice.desktop11
-rw-r--r--examples/widgets/graphicsview/collidingmice/collidingmice.pro17
-rw-r--r--examples/widgets/graphicsview/collidingmice/images/cheese.jpgbin0 -> 3029 bytes
-rw-r--r--examples/widgets/graphicsview/collidingmice/main.cpp91
-rw-r--r--examples/widgets/graphicsview/collidingmice/mice.qrc5
-rw-r--r--examples/widgets/graphicsview/collidingmice/mouse.cpp200
-rw-r--r--examples/widgets/graphicsview/collidingmice/mouse.h68
-rw-r--r--examples/widgets/graphicsview/diagramscene/arrow.cpp145
-rw-r--r--examples/widgets/graphicsview/diagramscene/arrow.h91
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramitem.cpp152
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramitem.h96
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.cpp240
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.desktop11
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.h112
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.pro23
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.qrc20
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramtextitem.cpp81
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramtextitem.h78
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/background1.pngbin0 -> 112 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/background2.pngbin0 -> 114 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/background3.pngbin0 -> 116 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/background4.pngbin0 -> 96 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/bold.pngbin0 -> 274 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/bringtofront.pngbin0 -> 293 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/delete.pngbin0 -> 831 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/floodfill.pngbin0 -> 282 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/italic.pngbin0 -> 247 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/linecolor.pngbin0 -> 145 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/linepointer.pngbin0 -> 141 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/pointer.pngbin0 -> 173 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/sendtoback.pngbin0 -> 318 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/textpointer.pngbin0 -> 753 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/underline.pngbin0 -> 250 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/main.cpp55
-rw-r--r--examples/widgets/graphicsview/diagramscene/mainwindow.cpp661
-rw-r--r--examples/widgets/graphicsview/diagramscene/mainwindow.h150
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/coloritem.cpp142
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/coloritem.h65
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/dragdroprobot.desktop11
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/dragdroprobot.pro22
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/images/head.pngbin0 -> 14972 bytes
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/main.cpp94
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/robot.cpp307
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/robot.h118
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/robot.qrc5
-rw-r--r--examples/widgets/graphicsview/elasticnodes/edge.cpp149
-rw-r--r--examples/widgets/graphicsview/elasticnodes/edge.h75
-rw-r--r--examples/widgets/graphicsview/elasticnodes/elasticnodes.desktop11
-rw-r--r--examples/widgets/graphicsview/elasticnodes/elasticnodes.pro20
-rw-r--r--examples/widgets/graphicsview/elasticnodes/graphwidget.cpp250
-rw-r--r--examples/widgets/graphicsview/elasticnodes/graphwidget.h77
-rw-r--r--examples/widgets/graphicsview/elasticnodes/main.cpp57
-rw-r--r--examples/widgets/graphicsview/elasticnodes/node.cpp212
-rw-r--r--examples/widgets/graphicsview/elasticnodes/node.h85
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/No-Ones-Laughing-3.jpgbin0 -> 30730 bytes
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/customproxy.cpp167
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/customproxy.h76
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.cpp106
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.h66
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/embeddeddialog.ui87
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/embeddeddialogs.pro19
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/embeddeddialogs.qrc5
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/main.cpp83
-rw-r--r--examples/widgets/graphicsview/flowlayout/flowlayout.cpp213
-rw-r--r--examples/widgets/graphicsview/flowlayout/flowlayout.desktop11
-rw-r--r--examples/widgets/graphicsview/flowlayout/flowlayout.h76
-rw-r--r--examples/widgets/graphicsview/flowlayout/flowlayout.pro14
-rw-r--r--examples/widgets/graphicsview/flowlayout/main.cpp57
-rw-r--r--examples/widgets/graphicsview/flowlayout/window.cpp62
-rw-r--r--examples/widgets/graphicsview/flowlayout/window.h47
-rw-r--r--examples/widgets/graphicsview/graphicsview.pro28
-rw-r--r--examples/widgets/graphicsview/padnavigator/flippablepad.cpp98
-rw-r--r--examples/widgets/graphicsview/padnavigator/flippablepad.h63
-rw-r--r--examples/widgets/graphicsview/padnavigator/form.ui208
-rw-r--r--examples/widgets/graphicsview/padnavigator/images/artsfftscope.pngbin0 -> 1291 bytes
-rw-r--r--examples/widgets/graphicsview/padnavigator/images/blue_angle_swirl.jpgbin0 -> 11826 bytes
-rw-r--r--examples/widgets/graphicsview/padnavigator/images/kontact_contacts.pngbin0 -> 4382 bytes
-rw-r--r--examples/widgets/graphicsview/padnavigator/images/kontact_journal.pngbin0 -> 3261 bytes
-rw-r--r--examples/widgets/graphicsview/padnavigator/images/kontact_mail.pngbin0 -> 3202 bytes
-rw-r--r--examples/widgets/graphicsview/padnavigator/images/kontact_notes.pngbin0 -> 3893 bytes
-rw-r--r--examples/widgets/graphicsview/padnavigator/images/kopeteavailable.pngbin0 -> 2380 bytes
-rw-r--r--examples/widgets/graphicsview/padnavigator/images/metacontact_online.pngbin0 -> 2545 bytes
-rw-r--r--examples/widgets/graphicsview/padnavigator/images/minitools.pngbin0 -> 2087 bytes
-rw-r--r--examples/widgets/graphicsview/padnavigator/main.cpp55
-rw-r--r--examples/widgets/graphicsview/padnavigator/padnavigator.cpp306
-rw-r--r--examples/widgets/graphicsview/padnavigator/padnavigator.desktop11
-rw-r--r--examples/widgets/graphicsview/padnavigator/padnavigator.h70
-rw-r--r--examples/widgets/graphicsview/padnavigator/padnavigator.pro28
-rw-r--r--examples/widgets/graphicsview/padnavigator/padnavigator.qrc13
-rw-r--r--examples/widgets/graphicsview/padnavigator/roundrectitem.cpp113
-rw-r--r--examples/widgets/graphicsview/padnavigator/roundrectitem.h75
-rw-r--r--examples/widgets/graphicsview/padnavigator/splashitem.cpp83
-rw-r--r--examples/widgets/graphicsview/padnavigator/splashitem.h61
-rw-r--r--examples/widgets/graphicsview/portedasteroids/portedasteroids.desktop11
-rw-r--r--examples/widgets/graphicsview/portedcanvas/portedcanvas.desktop11
-rw-r--r--examples/widgets/graphicsview/simpleanchorlayout/main.cpp134
-rw-r--r--examples/widgets/graphicsview/simpleanchorlayout/simpleanchorlayout.desktop11
-rw-r--r--examples/widgets/graphicsview/simpleanchorlayout/simpleanchorlayout.pro12
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/images/5days.jpgbin0 -> 5748 bytes
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/images/details.jpgbin0 -> 5323 bytes
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/images/place.jpgbin0 -> 62438 bytes
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/images/tabbar.jpgbin0 -> 849 bytes
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/images/title.jpgbin0 -> 3472 bytes
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/images/weather-few-clouds.pngbin0 -> 18976 bytes
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/main.cpp274
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/weatheranchorlayout.desktop11
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/weatheranchorlayout.pro12
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/weatheranchorlayout.qrc10
-rw-r--r--examples/widgets/itemviews/README8
-rw-r--r--examples/widgets/itemviews/addressbook/adddialog.cpp82
-rw-r--r--examples/widgets/itemviews/addressbook/adddialog.h71
-rw-r--r--examples/widgets/itemviews/addressbook/addressbook.desktop11
-rw-r--r--examples/widgets/itemviews/addressbook/addressbook.pro19
-rw-r--r--examples/widgets/itemviews/addressbook/addresswidget.cpp236
-rw-r--r--examples/widgets/itemviews/addressbook/addresswidget.h82
-rw-r--r--examples/widgets/itemviews/addressbook/main.cpp52
-rw-r--r--examples/widgets/itemviews/addressbook/mainwindow.cpp137
-rw-r--r--examples/widgets/itemviews/addressbook/mainwindow.h75
-rw-r--r--examples/widgets/itemviews/addressbook/newaddresstab.cpp77
-rw-r--r--examples/widgets/itemviews/addressbook/newaddresstab.h74
-rw-r--r--examples/widgets/itemviews/addressbook/tablemodel.cpp184
-rw-r--r--examples/widgets/itemviews/addressbook/tablemodel.h72
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel/basicsortfiltermodel.desktop11
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro12
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel/main.cpp93
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel/window.cpp157
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel/window.h88
-rw-r--r--examples/widgets/itemviews/chart/chart.desktop11
-rw-r--r--examples/widgets/itemviews/chart/chart.pro18
-rw-r--r--examples/widgets/itemviews/chart/chart.qrc5
-rw-r--r--examples/widgets/itemviews/chart/main.cpp53
-rw-r--r--examples/widgets/itemviews/chart/mainwindow.cpp172
-rw-r--r--examples/widgets/itemviews/chart/mainwindow.h72
-rw-r--r--examples/widgets/itemviews/chart/mydata.cht8
-rw-r--r--examples/widgets/itemviews/chart/pieview.cpp557
-rw-r--r--examples/widgets/itemviews/chart/pieview.h114
-rw-r--r--examples/widgets/itemviews/chart/qtdata.cht14
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/coloreditorfactory.desktop11
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/coloreditorfactory.pro14
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/colorlisteditor.cpp76
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/colorlisteditor.h69
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/main.cpp53
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/window.cpp94
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/window.h57
-rw-r--r--examples/widgets/itemviews/combowidgetmapper/combowidgetmapper.desktop11
-rw-r--r--examples/widgets/itemviews/combowidgetmapper/combowidgetmapper.pro11
-rw-r--r--examples/widgets/itemviews/combowidgetmapper/main.cpp51
-rw-r--r--examples/widgets/itemviews/combowidgetmapper/window.cpp136
-rw-r--r--examples/widgets/itemviews/combowidgetmapper/window.h86
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/customsortfiltermodel.desktop11
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/customsortfiltermodel.pro14
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/main.cpp95
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp115
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/mysortfilterproxymodel.h73
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/window.cpp166
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/window.h90
-rw-r--r--examples/widgets/itemviews/dirview/dirview.desktop11
-rw-r--r--examples/widgets/itemviews/dirview/dirview.pro9
-rw-r--r--examples/widgets/itemviews/dirview/main.cpp62
-rw-r--r--examples/widgets/itemviews/editabletreemodel/default.txt40
-rw-r--r--examples/widgets/itemviews/editabletreemodel/editabletreemodel.desktop11
-rw-r--r--examples/widgets/itemviews/editabletreemodel/editabletreemodel.pro18
-rw-r--r--examples/widgets/itemviews/editabletreemodel/editabletreemodel.qrc5
-rw-r--r--examples/widgets/itemviews/editabletreemodel/main.cpp53
-rw-r--r--examples/widgets/itemviews/editabletreemodel/mainwindow.cpp181
-rw-r--r--examples/widgets/itemviews/editabletreemodel/mainwindow.h71
-rw-r--r--examples/widgets/itemviews/editabletreemodel/mainwindow.ui128
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treeitem.cpp179
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treeitem.h74
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treemodel.cpp288
-rw-r--r--examples/widgets/itemviews/editabletreemodel/treemodel.h97
-rw-r--r--examples/widgets/itemviews/fetchmore/fetchmore.desktop11
-rw-r--r--examples/widgets/itemviews/fetchmore/fetchmore.pro13
-rw-r--r--examples/widgets/itemviews/fetchmore/filelistmodel.cpp116
-rw-r--r--examples/widgets/itemviews/fetchmore/filelistmodel.h75
-rw-r--r--examples/widgets/itemviews/fetchmore/main.cpp50
-rw-r--r--examples/widgets/itemviews/fetchmore/window.cpp81
-rw-r--r--examples/widgets/itemviews/fetchmore/window.h64
-rw-r--r--examples/widgets/itemviews/frozencolumn/freezetablewidget.cpp165
-rw-r--r--examples/widgets/itemviews/frozencolumn/freezetablewidget.h72
-rw-r--r--examples/widgets/itemviews/frozencolumn/frozencolumn.desktop11
-rw-r--r--examples/widgets/itemviews/frozencolumn/frozencolumn.pro11
-rw-r--r--examples/widgets/itemviews/frozencolumn/grades.qrc5
-rw-r--r--examples/widgets/itemviews/frozencolumn/grades.txt36
-rw-r--r--examples/widgets/itemviews/frozencolumn/main.cpp88
-rw-r--r--examples/widgets/itemviews/interview/README2
-rw-r--r--examples/widgets/itemviews/interview/images/folder.pngbin0 -> 3910 bytes
-rw-r--r--examples/widgets/itemviews/interview/images/interview.pngbin0 -> 174 bytes
-rw-r--r--examples/widgets/itemviews/interview/images/services.pngbin0 -> 3749 bytes
-rw-r--r--examples/widgets/itemviews/interview/interview.pro19
-rw-r--r--examples/widgets/itemviews/interview/interview.qrc7
-rw-r--r--examples/widgets/itemviews/interview/main.cpp95
-rw-r--r--examples/widgets/itemviews/interview/model.cpp147
-rw-r--r--examples/widgets/itemviews/interview/model.h90
-rw-r--r--examples/widgets/itemviews/itemviews.pro25
-rw-r--r--examples/widgets/itemviews/pixelator/imagemodel.cpp92
-rw-r--r--examples/widgets/itemviews/pixelator/imagemodel.h68
-rw-r--r--examples/widgets/itemviews/pixelator/images.qrc5
-rw-r--r--examples/widgets/itemviews/pixelator/images/qt.pngbin0 -> 656 bytes
-rw-r--r--examples/widgets/itemviews/pixelator/main.cpp54
-rw-r--r--examples/widgets/itemviews/pixelator/mainwindow.cpp248
-rw-r--r--examples/widgets/itemviews/pixelator/mainwindow.h74
-rw-r--r--examples/widgets/itemviews/pixelator/pixelator.desktop11
-rw-r--r--examples/widgets/itemviews/pixelator/pixelator.pro17
-rw-r--r--examples/widgets/itemviews/pixelator/pixeldelegate.cpp107
-rw-r--r--examples/widgets/itemviews/pixelator/pixeldelegate.h79
-rw-r--r--examples/widgets/itemviews/puzzle/example.jpgbin0 -> 42654 bytes
-rw-r--r--examples/widgets/itemviews/puzzle/main.cpp54
-rw-r--r--examples/widgets/itemviews/puzzle/mainwindow.cpp149
-rw-r--r--examples/widgets/itemviews/puzzle/mainwindow.h77
-rw-r--r--examples/widgets/itemviews/puzzle/piecesmodel.cpp203
-rw-r--r--examples/widgets/itemviews/puzzle/piecesmodel.h82
-rw-r--r--examples/widgets/itemviews/puzzle/puzzle.desktop11
-rw-r--r--examples/widgets/itemviews/puzzle/puzzle.pro22
-rw-r--r--examples/widgets/itemviews/puzzle/puzzle.qrc5
-rw-r--r--examples/widgets/itemviews/puzzle/puzzlewidget.cpp214
-rw-r--r--examples/widgets/itemviews/puzzle/puzzlewidget.h89
-rw-r--r--examples/widgets/itemviews/simpledommodel/domitem.cpp101
-rw-r--r--examples/widgets/itemviews/simpledommodel/domitem.h66
-rw-r--r--examples/widgets/itemviews/simpledommodel/dommodel.cpp189
-rw-r--r--examples/widgets/itemviews/simpledommodel/dommodel.h76
-rw-r--r--examples/widgets/itemviews/simpledommodel/main.cpp52
-rw-r--r--examples/widgets/itemviews/simpledommodel/mainwindow.cpp84
-rw-r--r--examples/widgets/itemviews/simpledommodel/mainwindow.h70
-rw-r--r--examples/widgets/itemviews/simpledommodel/simpledommodel.desktop11
-rw-r--r--examples/widgets/itemviews/simpledommodel/simpledommodel.pro16
-rw-r--r--examples/widgets/itemviews/simpletreemodel/default.txt40
-rw-r--r--examples/widgets/itemviews/simpletreemodel/main.cpp61
-rw-r--r--examples/widgets/itemviews/simpletreemodel/simpletreemodel.desktop11
-rw-r--r--examples/widgets/itemviews/simpletreemodel/simpletreemodel.pro15
-rw-r--r--examples/widgets/itemviews/simpletreemodel/simpletreemodel.qrc5
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treeitem.cpp116
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treeitem.h70
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treemodel.cpp218
-rw-r--r--examples/widgets/itemviews/simpletreemodel/treemodel.h76
-rw-r--r--examples/widgets/itemviews/simplewidgetmapper/main.cpp51
-rw-r--r--examples/widgets/itemviews/simplewidgetmapper/simplewidgetmapper.desktop11
-rw-r--r--examples/widgets/itemviews/simplewidgetmapper/simplewidgetmapper.pro11
-rw-r--r--examples/widgets/itemviews/simplewidgetmapper/window.cpp133
-rw-r--r--examples/widgets/itemviews/simplewidgetmapper/window.h84
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/delegate.cpp102
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/delegate.h70
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/main.cpp86
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/spinboxdelegate.desktop11
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/spinboxdelegate.pro13
-rw-r--r--examples/widgets/itemviews/spreadsheet/images/interview.pngbin0 -> 174 bytes
-rw-r--r--examples/widgets/itemviews/spreadsheet/main.cpp55
-rw-r--r--examples/widgets/itemviews/spreadsheet/printview.cpp62
-rw-r--r--examples/widgets/itemviews/spreadsheet/printview.h63
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheet.cpp639
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheet.h124
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheet.pro23
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheet.qrc5
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.cpp114
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetdelegate.h65
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetitem.cpp167
-rw-r--r--examples/widgets/itemviews/spreadsheet/spreadsheetitem.h73
-rw-r--r--examples/widgets/itemviews/stardelegate/main.cpp107
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.cpp129
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.desktop11
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.h69
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.pro17
-rw-r--r--examples/widgets/itemviews/stardelegate/stareditor.cpp98
-rw-r--r--examples/widgets/itemviews/stardelegate/stareditor.h77
-rw-r--r--examples/widgets/itemviews/stardelegate/starrating.cpp102
-rw-r--r--examples/widgets/itemviews/stardelegate/starrating.h76
-rw-r--r--examples/widgets/layouts/README10
-rw-r--r--examples/widgets/layouts/basiclayouts/basiclayouts.desktop11
-rw-r--r--examples/widgets/layouts/basiclayouts/basiclayouts.pro13
-rw-r--r--examples/widgets/layouts/basiclayouts/dialog.cpp149
-rw-r--r--examples/widgets/layouts/basiclayouts/dialog.h90
-rw-r--r--examples/widgets/layouts/basiclayouts/main.cpp52
-rw-r--r--examples/widgets/layouts/borderlayout/borderlayout.cpp213
-rw-r--r--examples/widgets/layouts/borderlayout/borderlayout.desktop11
-rw-r--r--examples/widgets/layouts/borderlayout/borderlayout.h88
-rw-r--r--examples/widgets/layouts/borderlayout/borderlayout.pro13
-rw-r--r--examples/widgets/layouts/borderlayout/main.cpp (renamed from examples/widgets/lineedits/main.cpp)0
-rw-r--r--examples/widgets/layouts/borderlayout/window.cpp68
-rw-r--r--examples/widgets/layouts/borderlayout/window.h61
-rw-r--r--examples/widgets/layouts/dynamiclayouts/dialog.cpp169
-rw-r--r--examples/widgets/layouts/dynamiclayouts/dialog.h91
-rw-r--r--examples/widgets/layouts/dynamiclayouts/dynamiclayouts.desktop11
-rw-r--r--examples/widgets/layouts/dynamiclayouts/dynamiclayouts.pro13
-rw-r--r--examples/widgets/layouts/dynamiclayouts/main.cpp51
-rw-r--r--examples/widgets/layouts/flowlayout/flowlayout.cpp213
-rw-r--r--examples/widgets/layouts/flowlayout/flowlayout.desktop11
-rw-r--r--examples/widgets/layouts/flowlayout/flowlayout.h78
-rw-r--r--examples/widgets/layouts/flowlayout/flowlayout.pro13
-rw-r--r--examples/widgets/layouts/flowlayout/main.cpp (renamed from examples/widgets/sliders/main.cpp)0
-rw-r--r--examples/widgets/layouts/flowlayout/window.cpp59
-rw-r--r--examples/widgets/layouts/flowlayout/window.h59
-rw-r--r--examples/widgets/layouts/layouts.pro12
-rw-r--r--examples/widgets/mainwindows/README9
-rw-r--r--examples/widgets/mainwindows/application/application.desktop11
-rw-r--r--examples/widgets/mainwindows/application/application.pro16
-rw-r--r--examples/widgets/mainwindows/application/application.qrc10
-rw-r--r--examples/widgets/mainwindows/application/images/copy.pngbin0 -> 1338 bytes
-rw-r--r--examples/widgets/mainwindows/application/images/cut.pngbin0 -> 1323 bytes
-rw-r--r--examples/widgets/mainwindows/application/images/new.pngbin0 -> 852 bytes
-rw-r--r--examples/widgets/mainwindows/application/images/open.pngbin0 -> 2073 bytes
-rw-r--r--examples/widgets/mainwindows/application/images/paste.pngbin0 -> 1645 bytes
-rw-r--r--examples/widgets/mainwindows/application/images/save.pngbin0 -> 1187 bytes
-rw-r--r--examples/widgets/mainwindows/application/main.cpp57
-rw-r--r--examples/widgets/mainwindows/application/mainwindow.cpp392
-rw-r--r--examples/widgets/mainwindows/application/mainwindow.h105
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets.desktop11
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets.pro15
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets.qrc8
-rw-r--r--examples/widgets/mainwindows/dockwidgets/images/new.pngbin0 -> 977 bytes
-rw-r--r--examples/widgets/mainwindows/dockwidgets/images/print.pngbin0 -> 1732 bytes
-rw-r--r--examples/widgets/mainwindows/dockwidgets/images/save.pngbin0 -> 1894 bytes
-rw-r--r--examples/widgets/mainwindows/dockwidgets/images/undo.pngbin0 -> 1768 bytes
-rw-r--r--examples/widgets/mainwindows/dockwidgets/main.cpp52
-rw-r--r--examples/widgets/mainwindows/dockwidgets/mainwindow.cpp345
-rw-r--r--examples/widgets/mainwindows/dockwidgets/mainwindow.h97
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.cpp746
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.h136
-rw-r--r--examples/widgets/mainwindows/mainwindow/main.cpp164
-rw-r--r--examples/widgets/mainwindows/mainwindow/mainwindow.cpp509
-rw-r--r--examples/widgets/mainwindows/mainwindow/mainwindow.h90
-rw-r--r--examples/widgets/mainwindows/mainwindow/mainwindow.pro17
-rw-r--r--examples/widgets/mainwindows/mainwindow/mainwindow.qrc8
-rw-r--r--examples/widgets/mainwindows/mainwindow/qt.pngbin0 -> 2037 bytes
-rw-r--r--examples/widgets/mainwindows/mainwindow/titlebarCenter.pngbin0 -> 146 bytes
-rw-r--r--examples/widgets/mainwindows/mainwindow/titlebarLeft.pngbin0 -> 5148 bytes
-rw-r--r--examples/widgets/mainwindows/mainwindow/titlebarRight.pngbin0 -> 2704 bytes
-rw-r--r--examples/widgets/mainwindows/mainwindow/toolbar.cpp383
-rw-r--r--examples/widgets/mainwindows/mainwindow/toolbar.h118
-rw-r--r--examples/widgets/mainwindows/mainwindows.pro16
-rw-r--r--examples/widgets/mainwindows/mdi/images/copy.pngbin0 -> 1338 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/images/cut.pngbin0 -> 1323 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/images/new.pngbin0 -> 852 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/images/open.pngbin0 -> 2073 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/images/paste.pngbin0 -> 1645 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/images/save.pngbin0 -> 1187 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/main.cpp53
-rw-r--r--examples/widgets/mainwindows/mdi/mainwindow.cpp411
-rw-r--r--examples/widgets/mainwindows/mdi/mainwindow.h122
-rw-r--r--examples/widgets/mainwindows/mdi/mdi.desktop11
-rw-r--r--examples/widgets/mainwindows/mdi/mdi.pro16
-rw-r--r--examples/widgets/mainwindows/mdi/mdi.qrc10
-rw-r--r--examples/widgets/mainwindows/mdi/mdichild.cpp175
-rw-r--r--examples/widgets/mainwindows/mdi/mdichild.h76
-rw-r--r--examples/widgets/mainwindows/menus/main.cpp (renamed from examples/widgets/charactermap/main.cpp)0
-rw-r--r--examples/widgets/mainwindows/menus/mainwindow.cpp370
-rw-r--r--examples/widgets/mainwindows/menus/mainwindow.h124
-rw-r--r--examples/widgets/mainwindows/menus/menus.desktop11
-rw-r--r--examples/widgets/mainwindows/menus/menus.pro11
-rw-r--r--examples/widgets/mainwindows/recentfiles/main.cpp53
-rw-r--r--examples/widgets/mainwindows/recentfiles/mainwindow.cpp251
-rw-r--r--examples/widgets/mainwindows/recentfiles/mainwindow.h96
-rw-r--r--examples/widgets/mainwindows/recentfiles/recentfiles.desktop11
-rw-r--r--examples/widgets/mainwindows/recentfiles/recentfiles.pro13
-rw-r--r--examples/widgets/mainwindows/sdi/images/copy.pngbin0 -> 1338 bytes
-rw-r--r--examples/widgets/mainwindows/sdi/images/cut.pngbin0 -> 1323 bytes
-rw-r--r--examples/widgets/mainwindows/sdi/images/new.pngbin0 -> 852 bytes
-rw-r--r--examples/widgets/mainwindows/sdi/images/open.pngbin0 -> 2073 bytes
-rw-r--r--examples/widgets/mainwindows/sdi/images/paste.pngbin0 -> 1645 bytes
-rw-r--r--examples/widgets/mainwindows/sdi/images/save.pngbin0 -> 1187 bytes
-rw-r--r--examples/widgets/mainwindows/sdi/main.cpp54
-rw-r--r--examples/widgets/mainwindows/sdi/mainwindow.cpp372
-rw-r--r--examples/widgets/mainwindows/sdi/mainwindow.h110
-rw-r--r--examples/widgets/mainwindows/sdi/sdi.desktop11
-rw-r--r--examples/widgets/mainwindows/sdi/sdi.pro14
-rw-r--r--examples/widgets/mainwindows/sdi/sdi.qrc10
-rw-r--r--examples/widgets/painting/README11
-rw-r--r--examples/widgets/painting/affine/affine.pro24
-rw-r--r--examples/widgets/painting/affine/affine.qrc7
-rw-r--r--examples/widgets/painting/affine/bg1.jpgbin0 -> 23771 bytes
-rw-r--r--examples/widgets/painting/affine/main.cpp65
-rw-r--r--examples/widgets/painting/affine/xform.cpp902
-rw-r--r--examples/widgets/painting/affine/xform.h141
-rw-r--r--examples/widgets/painting/affine/xform.html23
-rw-r--r--examples/widgets/painting/basicdrawing/basicdrawing.desktop11
-rw-r--r--examples/widgets/painting/basicdrawing/basicdrawing.pro14
-rw-r--r--examples/widgets/painting/basicdrawing/basicdrawing.qrc6
-rw-r--r--examples/widgets/painting/basicdrawing/images/brick.pngbin0 -> 767 bytes
-rw-r--r--examples/widgets/painting/basicdrawing/images/qt-logo.pngbin0 -> 3696 bytes
-rw-r--r--examples/widgets/painting/basicdrawing/main.cpp53
-rw-r--r--examples/widgets/painting/basicdrawing/renderarea.cpp207
-rw-r--r--examples/widgets/painting/basicdrawing/renderarea.h83
-rw-r--r--examples/widgets/painting/basicdrawing/window.cpp259
-rw-r--r--examples/widgets/painting/basicdrawing/window.h87
-rw-r--r--examples/widgets/painting/composition/composition.cpp522
-rw-r--r--examples/widgets/painting/composition/composition.h187
-rw-r--r--examples/widgets/painting/composition/composition.html23
-rw-r--r--examples/widgets/painting/composition/composition.pro29
-rw-r--r--examples/widgets/painting/composition/composition.qrc8
-rw-r--r--examples/widgets/painting/composition/flower.jpgbin0 -> 49616 bytes
-rw-r--r--examples/widgets/painting/composition/flower_alpha.jpgbin0 -> 67326 bytes
-rw-r--r--examples/widgets/painting/composition/main.cpp65
-rw-r--r--examples/widgets/painting/concentriccircles/circlewidget.cpp124
-rw-r--r--examples/widgets/painting/concentriccircles/circlewidget.h73
-rw-r--r--examples/widgets/painting/concentriccircles/concentriccircles.desktop11
-rw-r--r--examples/widgets/painting/concentriccircles/concentriccircles.pro14
-rw-r--r--examples/widgets/painting/concentriccircles/main.cpp (renamed from examples/widgets/spinboxes/main.cpp)0
-rw-r--r--examples/widgets/painting/concentriccircles/window.cpp93
-rw-r--r--examples/widgets/painting/concentriccircles/window.h70
-rw-r--r--examples/widgets/painting/deform/deform.pro20
-rw-r--r--examples/widgets/painting/deform/deform.qrc6
-rw-r--r--examples/widgets/painting/deform/main.cpp72
-rw-r--r--examples/widgets/painting/deform/pathdeform.cpp646
-rw-r--r--examples/widgets/painting/deform/pathdeform.h153
-rw-r--r--examples/widgets/painting/deform/pathdeform.html24
-rw-r--r--examples/widgets/painting/fontsampler/fontsampler.desktop11
-rw-r--r--examples/widgets/painting/fontsampler/fontsampler.pro13
-rw-r--r--examples/widgets/painting/fontsampler/main.cpp (renamed from examples/widgets/scribble/main.cpp)0
-rw-r--r--examples/widgets/painting/fontsampler/mainwindow.cpp380
-rw-r--r--examples/widgets/painting/fontsampler/mainwindow.h87
-rw-r--r--examples/widgets/painting/fontsampler/mainwindowbase.ui142
-rw-r--r--examples/widgets/painting/gradients/gradients.cpp516
-rw-r--r--examples/widgets/painting/gradients/gradients.h170
-rw-r--r--examples/widgets/painting/gradients/gradients.html31
-rw-r--r--examples/widgets/painting/gradients/gradients.pro20
-rw-r--r--examples/widgets/painting/gradients/gradients.qrc6
-rw-r--r--examples/widgets/painting/gradients/main.cpp63
-rw-r--r--examples/widgets/painting/imagecomposition/imagecomposer.cpp211
-rw-r--r--examples/widgets/painting/imagecomposition/imagecomposer.h87
-rw-r--r--examples/widgets/painting/imagecomposition/imagecomposition.desktop11
-rw-r--r--examples/widgets/painting/imagecomposition/imagecomposition.pro13
-rw-r--r--examples/widgets/painting/imagecomposition/imagecomposition.qrc6
-rw-r--r--examples/widgets/painting/imagecomposition/images/background.pngbin0 -> 18579 bytes
-rw-r--r--examples/widgets/painting/imagecomposition/images/blackrectangle.pngbin0 -> 90 bytes
-rw-r--r--examples/widgets/painting/imagecomposition/images/butterfly.pngbin0 -> 36868 bytes
-rw-r--r--examples/widgets/painting/imagecomposition/images/checker.pngbin0 -> 10384 bytes
-rw-r--r--examples/widgets/painting/imagecomposition/main.cpp55
-rw-r--r--examples/widgets/painting/painterpaths/main.cpp51
-rw-r--r--examples/widgets/painting/painterpaths/painterpaths.desktop11
-rw-r--r--examples/widgets/painting/painterpaths/painterpaths.pro15
-rw-r--r--examples/widgets/painting/painterpaths/renderarea.cpp130
-rw-r--r--examples/widgets/painting/painterpaths/renderarea.h80
-rw-r--r--examples/widgets/painting/painterpaths/window.cpp289
-rw-r--r--examples/widgets/painting/painterpaths/window.h90
-rw-r--r--examples/widgets/painting/painting.pro36
-rw-r--r--examples/widgets/painting/pathstroke/main.cpp71
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.cpp685
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.h171
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.html20
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.pro21
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.qrc6
-rw-r--r--examples/widgets/painting/shared/arthurstyle.cpp452
-rw-r--r--examples/widgets/painting/shared/arthurstyle.h79
-rw-r--r--examples/widgets/painting/shared/arthurwidgets.cpp355
-rw-r--r--examples/widgets/painting/shared/arthurwidgets.h137
-rw-r--r--examples/widgets/painting/shared/hoverpoints.cpp415
-rw-r--r--examples/widgets/painting/shared/hoverpoints.h162
-rw-r--r--examples/widgets/painting/shared/images/bg_pattern.pngbin0 -> 104 bytes
-rw-r--r--examples/widgets/painting/shared/images/button_normal_cap_left.pngbin0 -> 654 bytes
-rw-r--r--examples/widgets/painting/shared/images/button_normal_cap_right.pngbin0 -> 674 bytes
-rw-r--r--examples/widgets/painting/shared/images/button_normal_stretch.pngbin0 -> 185 bytes
-rw-r--r--examples/widgets/painting/shared/images/button_pressed_cap_left.pngbin0 -> 710 bytes
-rw-r--r--examples/widgets/painting/shared/images/button_pressed_cap_right.pngbin0 -> 785 bytes
-rw-r--r--examples/widgets/painting/shared/images/button_pressed_stretch.pngbin0 -> 217 bytes
-rw-r--r--examples/widgets/painting/shared/images/curve_thing_edit-6.pngbin0 -> 58097 bytes
-rw-r--r--examples/widgets/painting/shared/images/frame_bottom.pngbin0 -> 166 bytes
-rw-r--r--examples/widgets/painting/shared/images/frame_bottomleft.pngbin0 -> 602 bytes
-rw-r--r--examples/widgets/painting/shared/images/frame_bottomright.pngbin0 -> 553 bytes
-rw-r--r--examples/widgets/painting/shared/images/frame_left.pngbin0 -> 182 bytes
-rw-r--r--examples/widgets/painting/shared/images/frame_right.pngbin0 -> 175 bytes
-rw-r--r--examples/widgets/painting/shared/images/frame_top.pngbin0 -> 188 bytes
-rw-r--r--examples/widgets/painting/shared/images/frame_topleft.pngbin0 -> 801 bytes
-rw-r--r--examples/widgets/painting/shared/images/frame_topright.pngbin0 -> 851 bytes
-rw-r--r--examples/widgets/painting/shared/images/groupframe_bottom_left.pngbin0 -> 397 bytes
-rw-r--r--examples/widgets/painting/shared/images/groupframe_bottom_right.pngbin0 -> 383 bytes
-rw-r--r--examples/widgets/painting/shared/images/groupframe_bottom_stretch.pngbin0 -> 141 bytes
-rw-r--r--examples/widgets/painting/shared/images/groupframe_left_stretch.pngbin0 -> 132 bytes
-rw-r--r--examples/widgets/painting/shared/images/groupframe_right_stretch.pngbin0 -> 113 bytes
-rw-r--r--examples/widgets/painting/shared/images/groupframe_top_stretch.pngbin0 -> 115 bytes
-rw-r--r--examples/widgets/painting/shared/images/groupframe_topleft.pngbin0 -> 412 bytes
-rw-r--r--examples/widgets/painting/shared/images/groupframe_topright.pngbin0 -> 449 bytes
-rw-r--r--examples/widgets/painting/shared/images/line_dash_dot.pngbin0 -> 151 bytes
-rw-r--r--examples/widgets/painting/shared/images/line_dash_dot_dot.pngbin0 -> 155 bytes
-rw-r--r--examples/widgets/painting/shared/images/line_dashed.pngbin0 -> 121 bytes
-rw-r--r--examples/widgets/painting/shared/images/line_dotted.pngbin0 -> 116 bytes
-rw-r--r--examples/widgets/painting/shared/images/line_solid.pngbin0 -> 110 bytes
-rw-r--r--examples/widgets/painting/shared/images/radiobutton-off.pngbin0 -> 442 bytes
-rw-r--r--examples/widgets/painting/shared/images/radiobutton-on.pngbin0 -> 474 bytes
-rw-r--r--examples/widgets/painting/shared/images/radiobutton_off.pngbin0 -> 442 bytes
-rw-r--r--examples/widgets/painting/shared/images/radiobutton_on.pngbin0 -> 499 bytes
-rw-r--r--examples/widgets/painting/shared/images/slider_bar.pngbin0 -> 748 bytes
-rw-r--r--examples/widgets/painting/shared/images/slider_thumb_off.pngbin0 -> 823 bytes
-rw-r--r--examples/widgets/painting/shared/images/slider_thumb_on.pngbin0 -> 798 bytes
-rw-r--r--examples/widgets/painting/shared/images/title_cap_left.pngbin0 -> 179 bytes
-rw-r--r--examples/widgets/painting/shared/images/title_cap_right.pngbin0 -> 184 bytes
-rw-r--r--examples/widgets/painting/shared/images/title_stretch.pngbin0 -> 106 bytes
-rw-r--r--examples/widgets/painting/shared/shared.pri20
-rw-r--r--examples/widgets/painting/shared/shared.pro34
-rw-r--r--examples/widgets/painting/shared/shared.qrc39
-rw-r--r--examples/widgets/painting/svggenerator/svggenerator.desktop11
-rw-r--r--examples/widgets/painting/svgviewer/svgviewer.desktop11
-rw-r--r--examples/widgets/painting/transformations/main.cpp51
-rw-r--r--examples/widgets/painting/transformations/renderarea.cpp172
-rw-r--r--examples/widgets/painting/transformations/renderarea.h90
-rw-r--r--examples/widgets/painting/transformations/transformations.desktop11
-rw-r--r--examples/widgets/painting/transformations/transformations.pro13
-rw-r--r--examples/widgets/painting/transformations/window.cpp180
-rw-r--r--examples/widgets/painting/transformations/window.h80
-rw-r--r--examples/widgets/richtext/README11
-rw-r--r--examples/widgets/richtext/calendar/calendar.desktop11
-rw-r--r--examples/widgets/richtext/calendar/calendar.pro11
-rw-r--r--examples/widgets/richtext/calendar/main.cpp52
-rw-r--r--examples/widgets/richtext/calendar/mainwindow.cpp215
-rw-r--r--examples/widgets/richtext/calendar/mainwindow.h73
-rw-r--r--examples/widgets/richtext/orderform/detailsdialog.cpp156
-rw-r--r--examples/widgets/richtext/orderform/detailsdialog.h90
-rw-r--r--examples/widgets/richtext/orderform/main.cpp55
-rw-r--r--examples/widgets/richtext/orderform/mainwindow.cpp253
-rw-r--r--examples/widgets/richtext/orderform/mainwindow.h76
-rw-r--r--examples/widgets/richtext/orderform/orderform.desktop11
-rw-r--r--examples/widgets/richtext/orderform/orderform.pro14
-rw-r--r--examples/widgets/richtext/richtext.pro11
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/highlighter.cpp147
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/highlighter.h84
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/main.cpp52
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/mainwindow.cpp128
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/mainwindow.h75
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.desktop11
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.pro20
-rw-r--r--examples/widgets/richtext/textedit/example.html79
-rw-r--r--examples/widgets/richtext/textedit/images/logo32.pngbin0 -> 1410 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/editcopy.pngbin0 -> 1468 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/editcut.pngbin0 -> 1512 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/editpaste.pngbin0 -> 1906 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/editredo.pngbin0 -> 1752 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/editundo.pngbin0 -> 1746 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/exportpdf.pngbin0 -> 1215 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/filenew.pngbin0 -> 1172 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/fileopen.pngbin0 -> 2168 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/fileprint.pngbin0 -> 2087 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/filesave.pngbin0 -> 1206 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textbold.pngbin0 -> 1611 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textcenter.pngbin0 -> 1404 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textitalic.pngbin0 -> 1164 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textjustify.pngbin0 -> 1257 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textleft.pngbin0 -> 1235 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textright.pngbin0 -> 1406 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/textunder.pngbin0 -> 1183 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/zoomin.pngbin0 -> 1696 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/mac/zoomout.pngbin0 -> 1662 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/editcopy.pngbin0 -> 1325 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/editcut.pngbin0 -> 1896 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/editpaste.pngbin0 -> 1482 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/editredo.pngbin0 -> 1787 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/editundo.pngbin0 -> 1768 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/exportpdf.pngbin0 -> 1059 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/filenew.pngbin0 -> 768 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/fileopen.pngbin0 -> 1662 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/fileprint.pngbin0 -> 1456 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/filesave.pngbin0 -> 1205 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textbold.pngbin0 -> 1134 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textcenter.pngbin0 -> 627 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textitalic.pngbin0 -> 829 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textjustify.pngbin0 -> 695 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textleft.pngbin0 -> 673 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textright.pngbin0 -> 677 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/textunder.pngbin0 -> 971 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/zoomin.pngbin0 -> 1208 bytes
-rw-r--r--examples/widgets/richtext/textedit/images/win/zoomout.pngbin0 -> 1226 bytes
-rw-r--r--examples/widgets/richtext/textedit/main.cpp54
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp737
-rw-r--r--examples/widgets/richtext/textedit/textedit.h130
-rw-r--r--examples/widgets/richtext/textedit/textedit.pro23
-rw-r--r--examples/widgets/richtext/textedit/textedit.qdoc45
-rw-r--r--examples/widgets/richtext/textedit/textedit.qrc44
-rw-r--r--examples/widgets/scroller/graphicsview/graphicsview.pro9
-rw-r--r--examples/widgets/scroller/graphicsview/main.cpp291
-rw-r--r--examples/widgets/scroller/scroller.pro2
-rw-r--r--examples/widgets/statemachine/README6
-rw-r--r--examples/widgets/statemachine/eventtransitions/eventtransitions.desktop11
-rw-r--r--examples/widgets/statemachine/eventtransitions/eventtransitions.pro11
-rw-r--r--examples/widgets/statemachine/eventtransitions/main.cpp115
-rw-r--r--examples/widgets/statemachine/factorial/factorial.desktop11
-rw-r--r--examples/widgets/statemachine/factorial/factorial.pro13
-rw-r--r--examples/widgets/statemachine/factorial/main.cpp175
-rw-r--r--examples/widgets/statemachine/pingpong/main.cpp139
-rw-r--r--examples/widgets/statemachine/pingpong/pingpong.desktop11
-rw-r--r--examples/widgets/statemachine/pingpong/pingpong.pro13
-rw-r--r--examples/widgets/statemachine/rogue/main.cpp54
-rw-r--r--examples/widgets/statemachine/rogue/movementtransition.h112
-rw-r--r--examples/widgets/statemachine/rogue/rogue.desktop11
-rw-r--r--examples/widgets/statemachine/rogue/rogue.pro13
-rw-r--r--examples/widgets/statemachine/rogue/window.cpp251
-rw-r--r--examples/widgets/statemachine/rogue/window.h90
-rw-r--r--examples/widgets/statemachine/statemachine.pro18
-rw-r--r--examples/widgets/statemachine/trafficlight/main.cpp184
-rw-r--r--examples/widgets/statemachine/trafficlight/trafficlight.desktop11
-rw-r--r--examples/widgets/statemachine/trafficlight/trafficlight.pro10
-rw-r--r--examples/widgets/statemachine/twowaybutton/main.cpp81
-rw-r--r--examples/widgets/statemachine/twowaybutton/twowaybutton.desktop11
-rw-r--r--examples/widgets/statemachine/twowaybutton/twowaybutton.pro10
-rw-r--r--examples/widgets/widgets.pro52
-rw-r--r--examples/widgets/widgets/README (renamed from examples/widgets/README)0
-rw-r--r--examples/widgets/widgets/analogclock/analogclock.cpp (renamed from examples/widgets/analogclock/analogclock.cpp)0
-rw-r--r--examples/widgets/widgets/analogclock/analogclock.desktop (renamed from examples/widgets/analogclock/analogclock.desktop)0
-rw-r--r--examples/widgets/widgets/analogclock/analogclock.h (renamed from examples/widgets/analogclock/analogclock.h)0
-rw-r--r--examples/widgets/widgets/analogclock/analogclock.pro (renamed from examples/widgets/analogclock/analogclock.pro)0
-rw-r--r--examples/widgets/widgets/analogclock/main.cpp (renamed from examples/widgets/analogclock/main.cpp)0
-rw-r--r--examples/widgets/widgets/applicationicon/applicationicon.desktop (renamed from examples/widgets/applicationicon/applicationicon.desktop)0
-rw-r--r--examples/widgets/widgets/applicationicon/applicationicon.png (renamed from examples/widgets/applicationicon/applicationicon.png)bin4023 -> 4023 bytes
-rw-r--r--examples/widgets/widgets/applicationicon/applicationicon.pro (renamed from examples/widgets/applicationicon/applicationicon.pro)0
-rw-r--r--examples/widgets/widgets/applicationicon/applicationicon.svg (renamed from examples/widgets/applicationicon/applicationicon.svg)0
-rw-r--r--examples/widgets/widgets/applicationicon/main.cpp (renamed from examples/widgets/applicationicon/main.cpp)0
-rw-r--r--examples/widgets/widgets/calculator/button.cpp (renamed from examples/widgets/calculator/button.cpp)0
-rw-r--r--examples/widgets/widgets/calculator/button.h (renamed from examples/widgets/calculator/button.h)0
-rw-r--r--examples/widgets/widgets/calculator/calculator.cpp (renamed from examples/widgets/calculator/calculator.cpp)0
-rw-r--r--examples/widgets/widgets/calculator/calculator.desktop (renamed from examples/widgets/calculator/calculator.desktop)0
-rw-r--r--examples/widgets/widgets/calculator/calculator.h (renamed from examples/widgets/calculator/calculator.h)0
-rw-r--r--examples/widgets/widgets/calculator/calculator.pro (renamed from examples/widgets/calculator/calculator.pro)0
-rw-r--r--examples/widgets/widgets/calculator/main.cpp (renamed from examples/widgets/calculator/main.cpp)0
-rw-r--r--examples/widgets/widgets/calculator/releasenotes.txt (renamed from examples/widgets/calculator/releasenotes.txt)0
-rw-r--r--examples/widgets/widgets/calendarwidget/calendarwidget.desktop (renamed from examples/widgets/calendarwidget/calendarwidget.desktop)0
-rw-r--r--examples/widgets/widgets/calendarwidget/calendarwidget.pro (renamed from examples/widgets/calendarwidget/calendarwidget.pro)0
-rw-r--r--examples/widgets/widgets/calendarwidget/main.cpp (renamed from examples/widgets/calendarwidget/main.cpp)0
-rw-r--r--examples/widgets/widgets/calendarwidget/window.cpp (renamed from examples/widgets/calendarwidget/window.cpp)0
-rw-r--r--examples/widgets/widgets/calendarwidget/window.h (renamed from examples/widgets/calendarwidget/window.h)0
-rw-r--r--examples/widgets/widgets/charactermap/charactermap.desktop (renamed from examples/widgets/charactermap/charactermap.desktop)0
-rw-r--r--examples/widgets/widgets/charactermap/charactermap.pro (renamed from examples/widgets/charactermap/charactermap.pro)0
-rw-r--r--examples/widgets/widgets/charactermap/characterwidget.cpp (renamed from examples/widgets/charactermap/characterwidget.cpp)0
-rw-r--r--examples/widgets/widgets/charactermap/characterwidget.h (renamed from examples/widgets/charactermap/characterwidget.h)0
-rw-r--r--examples/widgets/widgets/charactermap/main.cpp51
-rw-r--r--examples/widgets/widgets/charactermap/mainwindow.cpp (renamed from examples/widgets/charactermap/mainwindow.cpp)0
-rw-r--r--examples/widgets/widgets/charactermap/mainwindow.h (renamed from examples/widgets/charactermap/mainwindow.h)0
-rw-r--r--examples/widgets/widgets/codeeditor/codeeditor.cpp (renamed from examples/widgets/codeeditor/codeeditor.cpp)0
-rw-r--r--examples/widgets/widgets/codeeditor/codeeditor.desktop (renamed from examples/widgets/codeeditor/codeeditor.desktop)0
-rw-r--r--examples/widgets/widgets/codeeditor/codeeditor.h (renamed from examples/widgets/codeeditor/codeeditor.h)0
-rw-r--r--examples/widgets/widgets/codeeditor/codeeditor.pro (renamed from examples/widgets/codeeditor/codeeditor.pro)0
-rw-r--r--examples/widgets/widgets/codeeditor/main.cpp (renamed from examples/widgets/codeeditor/main.cpp)0
-rw-r--r--examples/widgets/widgets/digitalclock/digitalclock.cpp (renamed from examples/widgets/digitalclock/digitalclock.cpp)0
-rw-r--r--examples/widgets/widgets/digitalclock/digitalclock.desktop (renamed from examples/widgets/digitalclock/digitalclock.desktop)0
-rw-r--r--examples/widgets/widgets/digitalclock/digitalclock.h (renamed from examples/widgets/digitalclock/digitalclock.h)0
-rw-r--r--examples/widgets/widgets/digitalclock/digitalclock.pro (renamed from examples/widgets/digitalclock/digitalclock.pro)0
-rw-r--r--examples/widgets/widgets/digitalclock/main.cpp (renamed from examples/widgets/digitalclock/main.cpp)0
-rw-r--r--examples/widgets/widgets/elidedlabel/elidedlabel.cpp (renamed from examples/widgets/elidedlabel/elidedlabel.cpp)0
-rw-r--r--examples/widgets/widgets/elidedlabel/elidedlabel.desktop (renamed from examples/widgets/elidedlabel/elidedlabel.desktop)0
-rw-r--r--examples/widgets/widgets/elidedlabel/elidedlabel.h (renamed from examples/widgets/elidedlabel/elidedlabel.h)0
-rw-r--r--examples/widgets/widgets/elidedlabel/elidedlabel.pro (renamed from examples/widgets/elidedlabel/elidedlabel.pro)0
-rw-r--r--examples/widgets/widgets/elidedlabel/main.cpp (renamed from examples/widgets/elidedlabel/main.cpp)0
-rw-r--r--examples/widgets/widgets/elidedlabel/testwidget.cpp (renamed from examples/widgets/elidedlabel/testwidget.cpp)0
-rw-r--r--examples/widgets/widgets/elidedlabel/testwidget.h (renamed from examples/widgets/elidedlabel/testwidget.h)0
-rw-r--r--examples/widgets/widgets/groupbox/groupbox.desktop (renamed from examples/widgets/groupbox/groupbox.desktop)0
-rw-r--r--examples/widgets/widgets/groupbox/groupbox.pro (renamed from examples/widgets/groupbox/groupbox.pro)0
-rw-r--r--examples/widgets/widgets/groupbox/main.cpp51
-rw-r--r--examples/widgets/widgets/groupbox/window.cpp (renamed from examples/widgets/groupbox/window.cpp)0
-rw-r--r--examples/widgets/widgets/groupbox/window.h (renamed from examples/widgets/groupbox/window.h)0
-rw-r--r--examples/widgets/widgets/icons/iconpreviewarea.cpp (renamed from examples/widgets/icons/iconpreviewarea.cpp)0
-rw-r--r--examples/widgets/widgets/icons/iconpreviewarea.h (renamed from examples/widgets/icons/iconpreviewarea.h)0
-rw-r--r--examples/widgets/widgets/icons/icons.desktop (renamed from examples/widgets/icons/icons.desktop)0
-rw-r--r--examples/widgets/widgets/icons/icons.pro (renamed from examples/widgets/icons/icons.pro)0
-rw-r--r--examples/widgets/widgets/icons/iconsizespinbox.cpp (renamed from examples/widgets/icons/iconsizespinbox.cpp)0
-rw-r--r--examples/widgets/widgets/icons/iconsizespinbox.h (renamed from examples/widgets/icons/iconsizespinbox.h)0
-rw-r--r--examples/widgets/widgets/icons/imagedelegate.cpp (renamed from examples/widgets/icons/imagedelegate.cpp)0
-rw-r--r--examples/widgets/widgets/icons/imagedelegate.h (renamed from examples/widgets/icons/imagedelegate.h)0
-rw-r--r--examples/widgets/widgets/icons/images/designer.png (renamed from examples/widgets/icons/images/designer.png)bin4205 -> 4205 bytes
-rw-r--r--examples/widgets/widgets/icons/images/find_disabled.png (renamed from examples/widgets/icons/images/find_disabled.png)bin501 -> 501 bytes
-rw-r--r--examples/widgets/widgets/icons/images/find_normal.png (renamed from examples/widgets/icons/images/find_normal.png)bin838 -> 838 bytes
-rw-r--r--examples/widgets/widgets/icons/images/monkey_off_128x128.png (renamed from examples/widgets/icons/images/monkey_off_128x128.png)bin7045 -> 7045 bytes
-rw-r--r--examples/widgets/widgets/icons/images/monkey_off_16x16.png (renamed from examples/widgets/icons/images/monkey_off_16x16.png)bin683 -> 683 bytes
-rw-r--r--examples/widgets/widgets/icons/images/monkey_off_32x32.png (renamed from examples/widgets/icons/images/monkey_off_32x32.png)bin1609 -> 1609 bytes
-rw-r--r--examples/widgets/widgets/icons/images/monkey_off_64x64.png (renamed from examples/widgets/icons/images/monkey_off_64x64.png)bin3533 -> 3533 bytes
-rw-r--r--examples/widgets/widgets/icons/images/monkey_on_128x128.png (renamed from examples/widgets/icons/images/monkey_on_128x128.png)bin6909 -> 6909 bytes
-rw-r--r--examples/widgets/widgets/icons/images/monkey_on_16x16.png (renamed from examples/widgets/icons/images/monkey_on_16x16.png)bin681 -> 681 bytes
-rw-r--r--examples/widgets/widgets/icons/images/monkey_on_32x32.png (renamed from examples/widgets/icons/images/monkey_on_32x32.png)bin1577 -> 1577 bytes
-rw-r--r--examples/widgets/widgets/icons/images/monkey_on_64x64.png (renamed from examples/widgets/icons/images/monkey_on_64x64.png)bin3479 -> 3479 bytes
-rw-r--r--examples/widgets/widgets/icons/images/qt_extended_16x16.png (renamed from examples/widgets/icons/images/qt_extended_16x16.png)bin834 -> 834 bytes
-rw-r--r--examples/widgets/widgets/icons/images/qt_extended_32x32.png (renamed from examples/widgets/icons/images/qt_extended_32x32.png)bin1892 -> 1892 bytes
-rw-r--r--examples/widgets/widgets/icons/images/qt_extended_48x48.png (renamed from examples/widgets/icons/images/qt_extended_48x48.png)bin3672 -> 3672 bytes
-rw-r--r--examples/widgets/widgets/icons/main.cpp (renamed from examples/widgets/icons/main.cpp)0
-rw-r--r--examples/widgets/widgets/icons/mainwindow.cpp (renamed from examples/widgets/icons/mainwindow.cpp)0
-rw-r--r--examples/widgets/widgets/icons/mainwindow.h (renamed from examples/widgets/icons/mainwindow.h)0
-rw-r--r--examples/widgets/widgets/imageviewer/imageviewer.cpp (renamed from examples/widgets/imageviewer/imageviewer.cpp)0
-rw-r--r--examples/widgets/widgets/imageviewer/imageviewer.desktop (renamed from examples/widgets/imageviewer/imageviewer.desktop)0
-rw-r--r--examples/widgets/widgets/imageviewer/imageviewer.h (renamed from examples/widgets/imageviewer/imageviewer.h)0
-rw-r--r--examples/widgets/widgets/imageviewer/imageviewer.pro (renamed from examples/widgets/imageviewer/imageviewer.pro)0
-rw-r--r--examples/widgets/widgets/imageviewer/main.cpp (renamed from examples/widgets/imageviewer/main.cpp)0
-rw-r--r--examples/widgets/widgets/lineedits/lineedits.desktop (renamed from examples/widgets/lineedits/lineedits.desktop)0
-rw-r--r--examples/widgets/widgets/lineedits/lineedits.pro (renamed from examples/widgets/lineedits/lineedits.pro)0
-rw-r--r--examples/widgets/widgets/lineedits/main.cpp51
-rw-r--r--examples/widgets/widgets/lineedits/window.cpp (renamed from examples/widgets/lineedits/window.cpp)0
-rw-r--r--examples/widgets/widgets/lineedits/window.h (renamed from examples/widgets/lineedits/window.h)0
-rw-r--r--examples/widgets/widgets/mousebuttons/buttontester.cpp (renamed from examples/widgets/mousebuttons/buttontester.cpp)0
-rw-r--r--examples/widgets/widgets/mousebuttons/buttontester.h (renamed from examples/widgets/mousebuttons/buttontester.h)0
-rw-r--r--examples/widgets/widgets/mousebuttons/main.cpp (renamed from examples/widgets/mousebuttons/main.cpp)0
-rw-r--r--examples/widgets/widgets/mousebuttons/mousebuttons.pro (renamed from examples/widgets/mousebuttons/mousebuttons.pro)0
-rw-r--r--examples/widgets/widgets/movie/animation.gif (renamed from examples/widgets/movie/animation.gif)bin42629 -> 42629 bytes
-rw-r--r--examples/widgets/widgets/movie/main.cpp (renamed from examples/widgets/movie/main.cpp)0
-rw-r--r--examples/widgets/widgets/movie/movie.desktop (renamed from examples/widgets/movie/movie.desktop)0
-rw-r--r--examples/widgets/widgets/movie/movie.pro (renamed from examples/widgets/movie/movie.pro)0
-rw-r--r--examples/widgets/widgets/movie/movieplayer.cpp (renamed from examples/widgets/movie/movieplayer.cpp)0
-rw-r--r--examples/widgets/widgets/movie/movieplayer.h (renamed from examples/widgets/movie/movieplayer.h)0
-rw-r--r--examples/widgets/widgets/orientation/image_a.png (renamed from examples/widgets/orientation/image_a.png)bin1075 -> 1075 bytes
-rw-r--r--examples/widgets/widgets/orientation/image_b.png (renamed from examples/widgets/orientation/image_b.png)bin1020 -> 1020 bytes
-rw-r--r--examples/widgets/widgets/orientation/image_c.png (renamed from examples/widgets/orientation/image_c.png)bin1163 -> 1163 bytes
-rw-r--r--examples/widgets/widgets/orientation/images.qrc (renamed from examples/widgets/orientation/images.qrc)0
-rw-r--r--examples/widgets/widgets/orientation/landscape.ui (renamed from examples/widgets/orientation/landscape.ui)0
-rw-r--r--examples/widgets/widgets/orientation/main.cpp (renamed from examples/widgets/orientation/main.cpp)0
-rw-r--r--examples/widgets/widgets/orientation/mainwindow.cpp (renamed from examples/widgets/orientation/mainwindow.cpp)0
-rw-r--r--examples/widgets/widgets/orientation/mainwindow.h (renamed from examples/widgets/orientation/mainwindow.h)0
-rw-r--r--examples/widgets/widgets/orientation/orientation.desktop (renamed from examples/widgets/orientation/orientation.desktop)0
-rw-r--r--examples/widgets/widgets/orientation/orientation.pro (renamed from examples/widgets/orientation/orientation.pro)0
-rw-r--r--examples/widgets/widgets/orientation/portrait.ui (renamed from examples/widgets/orientation/portrait.ui)0
-rw-r--r--examples/widgets/widgets/scribble/main.cpp51
-rw-r--r--examples/widgets/widgets/scribble/mainwindow.cpp (renamed from examples/widgets/scribble/mainwindow.cpp)0
-rw-r--r--examples/widgets/widgets/scribble/mainwindow.h (renamed from examples/widgets/scribble/mainwindow.h)0
-rw-r--r--examples/widgets/widgets/scribble/scribble.desktop (renamed from examples/widgets/scribble/scribble.desktop)0
-rw-r--r--examples/widgets/widgets/scribble/scribble.pro (renamed from examples/widgets/scribble/scribble.pro)0
-rw-r--r--examples/widgets/widgets/scribble/scribblearea.cpp (renamed from examples/widgets/scribble/scribblearea.cpp)0
-rw-r--r--examples/widgets/widgets/scribble/scribblearea.h (renamed from examples/widgets/scribble/scribblearea.h)0
-rw-r--r--examples/widgets/widgets/shapedclock/main.cpp (renamed from examples/widgets/shapedclock/main.cpp)0
-rw-r--r--examples/widgets/widgets/shapedclock/shapedclock.cpp (renamed from examples/widgets/shapedclock/shapedclock.cpp)0
-rw-r--r--examples/widgets/widgets/shapedclock/shapedclock.desktop (renamed from examples/widgets/shapedclock/shapedclock.desktop)0
-rw-r--r--examples/widgets/widgets/shapedclock/shapedclock.h (renamed from examples/widgets/shapedclock/shapedclock.h)0
-rw-r--r--examples/widgets/widgets/shapedclock/shapedclock.pro (renamed from examples/widgets/shapedclock/shapedclock.pro)0
-rw-r--r--examples/widgets/widgets/sliders/main.cpp51
-rw-r--r--examples/widgets/widgets/sliders/sliders.desktop (renamed from examples/widgets/sliders/sliders.desktop)0
-rw-r--r--examples/widgets/widgets/sliders/sliders.pro (renamed from examples/widgets/sliders/sliders.pro)0
-rw-r--r--examples/widgets/widgets/sliders/slidersgroup.cpp (renamed from examples/widgets/sliders/slidersgroup.cpp)0
-rw-r--r--examples/widgets/widgets/sliders/slidersgroup.h (renamed from examples/widgets/sliders/slidersgroup.h)0
-rw-r--r--examples/widgets/widgets/sliders/window.cpp (renamed from examples/widgets/sliders/window.cpp)0
-rw-r--r--examples/widgets/widgets/sliders/window.h (renamed from examples/widgets/sliders/window.h)0
-rw-r--r--examples/widgets/widgets/softkeys/main.cpp (renamed from examples/widgets/softkeys/main.cpp)0
-rw-r--r--examples/widgets/widgets/softkeys/softkeys.cpp (renamed from examples/widgets/softkeys/softkeys.cpp)0
-rw-r--r--examples/widgets/widgets/softkeys/softkeys.desktop (renamed from examples/widgets/softkeys/softkeys.desktop)0
-rw-r--r--examples/widgets/widgets/softkeys/softkeys.h (renamed from examples/widgets/softkeys/softkeys.h)0
-rw-r--r--examples/widgets/widgets/softkeys/softkeys.pro (renamed from examples/widgets/softkeys/softkeys.pro)0
-rw-r--r--examples/widgets/widgets/spinboxes/main.cpp51
-rw-r--r--examples/widgets/widgets/spinboxes/spinboxes.desktop (renamed from examples/widgets/spinboxes/spinboxes.desktop)0
-rw-r--r--examples/widgets/widgets/spinboxes/spinboxes.pro (renamed from examples/widgets/spinboxes/spinboxes.pro)0
-rw-r--r--examples/widgets/widgets/spinboxes/window.cpp (renamed from examples/widgets/spinboxes/window.cpp)0
-rw-r--r--examples/widgets/widgets/spinboxes/window.h (renamed from examples/widgets/spinboxes/window.h)0
-rw-r--r--examples/widgets/widgets/styles/images/woodbackground.png (renamed from examples/widgets/styles/images/woodbackground.png)bin7691 -> 7691 bytes
-rw-r--r--examples/widgets/widgets/styles/images/woodbutton.png (renamed from examples/widgets/styles/images/woodbutton.png)bin7689 -> 7689 bytes
-rw-r--r--examples/widgets/widgets/styles/main.cpp (renamed from examples/widgets/styles/main.cpp)0
-rw-r--r--examples/widgets/widgets/styles/norwegianwoodstyle.cpp (renamed from examples/widgets/styles/norwegianwoodstyle.cpp)0
-rw-r--r--examples/widgets/widgets/styles/norwegianwoodstyle.h (renamed from examples/widgets/styles/norwegianwoodstyle.h)0
-rw-r--r--examples/widgets/widgets/styles/styles.desktop (renamed from examples/widgets/styles/styles.desktop)0
-rw-r--r--examples/widgets/widgets/styles/styles.pro (renamed from examples/widgets/styles/styles.pro)0
-rw-r--r--examples/widgets/widgets/styles/styles.qrc (renamed from examples/widgets/styles/styles.qrc)0
-rw-r--r--examples/widgets/widgets/styles/widgetgallery.cpp (renamed from examples/widgets/styles/widgetgallery.cpp)0
-rw-r--r--examples/widgets/widgets/styles/widgetgallery.h (renamed from examples/widgets/styles/widgetgallery.h)0
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_checked.png (renamed from examples/widgets/stylesheet/images/checkbox_checked.png)bin263 -> 263 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_checked_hover.png (renamed from examples/widgets/stylesheet/images/checkbox_checked_hover.png)bin266 -> 266 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_checked_pressed.png (renamed from examples/widgets/stylesheet/images/checkbox_checked_pressed.png)bin425 -> 425 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_unchecked.png (renamed from examples/widgets/stylesheet/images/checkbox_unchecked.png)bin159 -> 159 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_unchecked_hover.png (renamed from examples/widgets/stylesheet/images/checkbox_unchecked_hover.png)bin159 -> 159 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/checkbox_unchecked_pressed.png (renamed from examples/widgets/stylesheet/images/checkbox_unchecked_pressed.png)bin320 -> 320 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/down_arrow.png (renamed from examples/widgets/stylesheet/images/down_arrow.png)bin175 -> 175 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/down_arrow_disabled.png (renamed from examples/widgets/stylesheet/images/down_arrow_disabled.png)bin174 -> 174 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/frame.png (renamed from examples/widgets/stylesheet/images/frame.png)bin253 -> 253 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/pagefold.png (renamed from examples/widgets/stylesheet/images/pagefold.png)bin1545 -> 1545 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/pushbutton.png (renamed from examples/widgets/stylesheet/images/pushbutton.png)bin533 -> 533 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/pushbutton_hover.png (renamed from examples/widgets/stylesheet/images/pushbutton_hover.png)bin525 -> 525 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/pushbutton_pressed.png (renamed from examples/widgets/stylesheet/images/pushbutton_pressed.png)bin513 -> 513 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_checked.png (renamed from examples/widgets/stylesheet/images/radiobutton_checked.png)bin355 -> 355 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_checked_hover.png (renamed from examples/widgets/stylesheet/images/radiobutton_checked_hover.png)bin532 -> 532 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_checked_pressed.png (renamed from examples/widgets/stylesheet/images/radiobutton_checked_pressed.png)bin599 -> 599 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_unchecked.png (renamed from examples/widgets/stylesheet/images/radiobutton_unchecked.png)bin240 -> 240 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_unchecked_hover.png (renamed from examples/widgets/stylesheet/images/radiobutton_unchecked_hover.png)bin492 -> 492 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/radiobutton_unchecked_pressed.png (renamed from examples/widgets/stylesheet/images/radiobutton_unchecked_pressed.png)bin556 -> 556 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/sizegrip.png (renamed from examples/widgets/stylesheet/images/sizegrip.png)bin129 -> 129 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spindown.png (renamed from examples/widgets/stylesheet/images/spindown.png)bin276 -> 276 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spindown_hover.png (renamed from examples/widgets/stylesheet/images/spindown_hover.png)bin268 -> 268 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spindown_off.png (renamed from examples/widgets/stylesheet/images/spindown_off.png)bin249 -> 249 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spindown_pressed.png (renamed from examples/widgets/stylesheet/images/spindown_pressed.png)bin264 -> 264 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spinup.png (renamed from examples/widgets/stylesheet/images/spinup.png)bin283 -> 283 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spinup_hover.png (renamed from examples/widgets/stylesheet/images/spinup_hover.png)bin277 -> 277 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spinup_off.png (renamed from examples/widgets/stylesheet/images/spinup_off.png)bin274 -> 274 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/spinup_pressed.png (renamed from examples/widgets/stylesheet/images/spinup_pressed.png)bin277 -> 277 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/up_arrow.png (renamed from examples/widgets/stylesheet/images/up_arrow.png)bin197 -> 197 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/images/up_arrow_disabled.png (renamed from examples/widgets/stylesheet/images/up_arrow_disabled.png)bin172 -> 172 bytes
-rw-r--r--examples/widgets/widgets/stylesheet/layouts/default.ui (renamed from examples/widgets/stylesheet/layouts/default.ui)0
-rw-r--r--examples/widgets/widgets/stylesheet/layouts/pagefold.ui (renamed from examples/widgets/stylesheet/layouts/pagefold.ui)0
-rw-r--r--examples/widgets/widgets/stylesheet/main.cpp (renamed from examples/widgets/stylesheet/main.cpp)0
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.cpp (renamed from examples/widgets/stylesheet/mainwindow.cpp)0
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.h (renamed from examples/widgets/stylesheet/mainwindow.h)0
-rw-r--r--examples/widgets/widgets/stylesheet/mainwindow.ui (renamed from examples/widgets/stylesheet/mainwindow.ui)0
-rw-r--r--examples/widgets/widgets/stylesheet/qss/coffee.qss (renamed from examples/widgets/stylesheet/qss/coffee.qss)0
-rw-r--r--examples/widgets/widgets/stylesheet/qss/default.qss (renamed from examples/widgets/stylesheet/qss/default.qss)0
-rw-r--r--examples/widgets/widgets/stylesheet/qss/pagefold.qss (renamed from examples/widgets/stylesheet/qss/pagefold.qss)0
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheet.desktop (renamed from examples/widgets/stylesheet/stylesheet.desktop)0
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheet.pro (renamed from examples/widgets/stylesheet/stylesheet.pro)0
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheet.qrc (renamed from examples/widgets/stylesheet/stylesheet.qrc)0
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheeteditor.cpp (renamed from examples/widgets/stylesheet/stylesheeteditor.cpp)0
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheeteditor.h (renamed from examples/widgets/stylesheet/stylesheeteditor.h)0
-rw-r--r--examples/widgets/widgets/stylesheet/stylesheeteditor.ui (renamed from examples/widgets/stylesheet/stylesheeteditor.ui)0
-rw-r--r--examples/widgets/widgets/tablet/main.cpp (renamed from examples/widgets/tablet/main.cpp)0
-rw-r--r--examples/widgets/widgets/tablet/mainwindow.cpp (renamed from examples/widgets/tablet/mainwindow.cpp)0
-rw-r--r--examples/widgets/widgets/tablet/mainwindow.h (renamed from examples/widgets/tablet/mainwindow.h)0
-rw-r--r--examples/widgets/widgets/tablet/tablet.desktop (renamed from examples/widgets/tablet/tablet.desktop)0
-rw-r--r--examples/widgets/widgets/tablet/tablet.pro (renamed from examples/widgets/tablet/tablet.pro)0
-rw-r--r--examples/widgets/widgets/tablet/tabletapplication.cpp (renamed from examples/widgets/tablet/tabletapplication.cpp)0
-rw-r--r--examples/widgets/widgets/tablet/tabletapplication.h (renamed from examples/widgets/tablet/tabletapplication.h)0
-rw-r--r--examples/widgets/widgets/tablet/tabletcanvas.cpp (renamed from examples/widgets/tablet/tabletcanvas.cpp)0
-rw-r--r--examples/widgets/widgets/tablet/tabletcanvas.h (renamed from examples/widgets/tablet/tabletcanvas.h)0
-rw-r--r--examples/widgets/widgets/tetrix/main.cpp (renamed from examples/widgets/tetrix/main.cpp)0
-rw-r--r--examples/widgets/widgets/tetrix/tetrix.desktop (renamed from examples/widgets/tetrix/tetrix.desktop)0
-rw-r--r--examples/widgets/widgets/tetrix/tetrix.pro (renamed from examples/widgets/tetrix/tetrix.pro)0
-rw-r--r--examples/widgets/widgets/tetrix/tetrixboard.cpp (renamed from examples/widgets/tetrix/tetrixboard.cpp)0
-rw-r--r--examples/widgets/widgets/tetrix/tetrixboard.h (renamed from examples/widgets/tetrix/tetrixboard.h)0
-rw-r--r--examples/widgets/widgets/tetrix/tetrixpiece.cpp (renamed from examples/widgets/tetrix/tetrixpiece.cpp)0
-rw-r--r--examples/widgets/widgets/tetrix/tetrixpiece.h (renamed from examples/widgets/tetrix/tetrixpiece.h)0
-rw-r--r--examples/widgets/widgets/tetrix/tetrixwindow.cpp (renamed from examples/widgets/tetrix/tetrixwindow.cpp)0
-rw-r--r--examples/widgets/widgets/tetrix/tetrixwindow.h (renamed from examples/widgets/tetrix/tetrixwindow.h)0
-rw-r--r--examples/widgets/widgets/tooltips/images/circle.png (renamed from examples/widgets/tooltips/images/circle.png)bin165 -> 165 bytes
-rw-r--r--examples/widgets/widgets/tooltips/images/square.png (renamed from examples/widgets/tooltips/images/square.png)bin94 -> 94 bytes
-rw-r--r--examples/widgets/widgets/tooltips/images/triangle.png (renamed from examples/widgets/tooltips/images/triangle.png)bin170 -> 170 bytes
-rw-r--r--examples/widgets/widgets/tooltips/main.cpp (renamed from examples/widgets/tooltips/main.cpp)0
-rw-r--r--examples/widgets/widgets/tooltips/shapeitem.cpp (renamed from examples/widgets/tooltips/shapeitem.cpp)0
-rw-r--r--examples/widgets/widgets/tooltips/shapeitem.h (renamed from examples/widgets/tooltips/shapeitem.h)0
-rw-r--r--examples/widgets/widgets/tooltips/sortingbox.cpp (renamed from examples/widgets/tooltips/sortingbox.cpp)0
-rw-r--r--examples/widgets/widgets/tooltips/sortingbox.h (renamed from examples/widgets/tooltips/sortingbox.h)0
-rw-r--r--examples/widgets/widgets/tooltips/tooltips.desktop (renamed from examples/widgets/tooltips/tooltips.desktop)0
-rw-r--r--examples/widgets/widgets/tooltips/tooltips.pro (renamed from examples/widgets/tooltips/tooltips.pro)0
-rw-r--r--examples/widgets/widgets/tooltips/tooltips.qrc (renamed from examples/widgets/tooltips/tooltips.qrc)0
-rw-r--r--examples/widgets/widgets/validators/ledoff.png (renamed from examples/widgets/validators/ledoff.png)bin562 -> 562 bytes
-rw-r--r--examples/widgets/widgets/validators/ledon.png (renamed from examples/widgets/validators/ledon.png)bin486 -> 486 bytes
-rw-r--r--examples/widgets/widgets/validators/ledwidget.cpp (renamed from examples/widgets/validators/ledwidget.cpp)0
-rw-r--r--examples/widgets/widgets/validators/ledwidget.h (renamed from examples/widgets/validators/ledwidget.h)0
-rw-r--r--examples/widgets/widgets/validators/localeselector.cpp (renamed from examples/widgets/validators/localeselector.cpp)0
-rw-r--r--examples/widgets/widgets/validators/localeselector.h (renamed from examples/widgets/validators/localeselector.h)0
-rw-r--r--examples/widgets/widgets/validators/main.cpp (renamed from examples/widgets/validators/main.cpp)0
-rw-r--r--examples/widgets/widgets/validators/validators.desktop (renamed from examples/widgets/validators/validators.desktop)0
-rw-r--r--examples/widgets/widgets/validators/validators.pro (renamed from examples/widgets/validators/validators.pro)0
-rw-r--r--examples/widgets/widgets/validators/validators.qrc (renamed from examples/widgets/validators/validators.qrc)0
-rw-r--r--examples/widgets/widgets/validators/validators.ui (renamed from examples/widgets/validators/validators.ui)0
-rw-r--r--examples/widgets/widgets/widgets.pro34
-rw-r--r--examples/widgets/widgets/wiggly/dialog.cpp (renamed from examples/widgets/wiggly/dialog.cpp)0
-rw-r--r--examples/widgets/widgets/wiggly/dialog.h (renamed from examples/widgets/wiggly/dialog.h)0
-rw-r--r--examples/widgets/widgets/wiggly/main.cpp (renamed from examples/widgets/wiggly/main.cpp)0
-rw-r--r--examples/widgets/widgets/wiggly/wiggly.desktop (renamed from examples/widgets/wiggly/wiggly.desktop)0
-rw-r--r--examples/widgets/widgets/wiggly/wiggly.pro (renamed from examples/widgets/wiggly/wiggly.pro)0
-rw-r--r--examples/widgets/widgets/wiggly/wigglywidget.cpp (renamed from examples/widgets/wiggly/wigglywidget.cpp)0
-rw-r--r--examples/widgets/widgets/wiggly/wigglywidget.h (renamed from examples/widgets/wiggly/wigglywidget.h)0
-rw-r--r--examples/widgets/widgets/windowflags/controllerwindow.cpp (renamed from examples/widgets/windowflags/controllerwindow.cpp)0
-rw-r--r--examples/widgets/widgets/windowflags/controllerwindow.h (renamed from examples/widgets/windowflags/controllerwindow.h)0
-rw-r--r--examples/widgets/widgets/windowflags/main.cpp (renamed from examples/widgets/windowflags/main.cpp)0
-rw-r--r--examples/widgets/widgets/windowflags/previewwindow.cpp (renamed from examples/widgets/windowflags/previewwindow.cpp)0
-rw-r--r--examples/widgets/widgets/windowflags/previewwindow.h (renamed from examples/widgets/windowflags/previewwindow.h)0
-rw-r--r--examples/widgets/widgets/windowflags/windowflags.desktop (renamed from examples/widgets/windowflags/windowflags.desktop)0
-rw-r--r--examples/widgets/widgets/windowflags/windowflags.pro (renamed from examples/widgets/windowflags/windowflags.pro)0
1299 files changed, 83542 insertions, 31 deletions
diff --git a/examples/widgets/animation/README b/examples/widgets/animation/README
new file mode 100644
index 0000000000..e723a28722
--- /dev/null
+++ b/examples/widgets/animation/README
@@ -0,0 +1,8 @@
+The animation framework aims to provide an easy way for creating animated and
+smooth GUI's. By animating Qt properties, the framework provides great freedom
+for animating widgets and other QObjects. The framework can also be used with
+the Graphics View framework.
+
+
+Documentation for these examples can be found via the Examples
+link in the main Qt documentation.
diff --git a/examples/widgets/animation/animatedtiles/animatedtiles.desktop b/examples/widgets/animation/animatedtiles/animatedtiles.desktop
new file mode 100644
index 0000000000..97e646fdf8
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/animatedtiles.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Animated Tiles
+Exec=/opt/usr/bin/animatedtiles
+Icon=animatedtiles
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/animation/animatedtiles/animatedtiles.pro b/examples/widgets/animation/animatedtiles/animatedtiles.pro
new file mode 100644
index 0000000000..1bba99449c
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/animatedtiles.pro
@@ -0,0 +1,10 @@
+SOURCES = main.cpp
+RESOURCES = animatedtiles.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/animatedtiles
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS animatedtiles.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/animatedtiles
+INSTALLS += target sources
+
+QT += widgets
diff --git a/examples/widgets/animation/animatedtiles/animatedtiles.qrc b/examples/widgets/animation/animatedtiles/animatedtiles.qrc
new file mode 100644
index 0000000000..c43a979723
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/animatedtiles.qrc
@@ -0,0 +1,11 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/Time-For-Lunch-2.jpg</file>
+ <file>images/centered.png</file>
+ <file>images/ellipse.png</file>
+ <file>images/figure8.png</file>
+ <file>images/kinetic.png</file>
+ <file>images/random.png</file>
+ <file>images/tile.png</file>
+</qresource>
+</RCC>
diff --git a/examples/widgets/animation/animatedtiles/images/Time-For-Lunch-2.jpg b/examples/widgets/animation/animatedtiles/images/Time-For-Lunch-2.jpg
new file mode 100644
index 0000000000..c57a555490
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/images/Time-For-Lunch-2.jpg
Binary files differ
diff --git a/examples/widgets/animation/animatedtiles/images/centered.png b/examples/widgets/animation/animatedtiles/images/centered.png
new file mode 100644
index 0000000000..e416156a0e
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/images/centered.png
Binary files differ
diff --git a/examples/widgets/animation/animatedtiles/images/ellipse.png b/examples/widgets/animation/animatedtiles/images/ellipse.png
new file mode 100644
index 0000000000..2c3ba881c5
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/images/ellipse.png
Binary files differ
diff --git a/examples/widgets/animation/animatedtiles/images/figure8.png b/examples/widgets/animation/animatedtiles/images/figure8.png
new file mode 100644
index 0000000000..6b058041c4
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/images/figure8.png
Binary files differ
diff --git a/examples/widgets/animation/animatedtiles/images/kinetic.png b/examples/widgets/animation/animatedtiles/images/kinetic.png
new file mode 100644
index 0000000000..55cfa5515f
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/images/kinetic.png
Binary files differ
diff --git a/examples/widgets/animation/animatedtiles/images/random.png b/examples/widgets/animation/animatedtiles/images/random.png
new file mode 100644
index 0000000000..415d96f856
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/images/random.png
Binary files differ
diff --git a/examples/widgets/animation/animatedtiles/images/tile.png b/examples/widgets/animation/animatedtiles/images/tile.png
new file mode 100644
index 0000000000..c8f39d8d40
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/images/tile.png
Binary files differ
diff --git a/examples/widgets/animation/animatedtiles/main.cpp b/examples/widgets/animation/animatedtiles/main.cpp
new file mode 100644
index 0000000000..50bd33860e
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/main.cpp
@@ -0,0 +1,256 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtWidgets>
+#include <QtCore/qstate.h>
+
+class Pixmap : public QObject, public QGraphicsPixmapItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QPointF pos READ pos WRITE setPos)
+public:
+ Pixmap(const QPixmap &pix)
+ : QObject(), QGraphicsPixmapItem(pix)
+ {
+ setCacheMode(DeviceCoordinateCache);
+ }
+};
+
+class Button : public QGraphicsWidget
+{
+ Q_OBJECT
+public:
+ Button(const QPixmap &pixmap, QGraphicsItem *parent = 0)
+ : QGraphicsWidget(parent), _pix(pixmap)
+ {
+ setAcceptHoverEvents(true);
+ setCacheMode(DeviceCoordinateCache);
+ }
+
+ QRectF boundingRect() const
+ {
+ return QRectF(-65, -65, 130, 130);
+ }
+
+ QPainterPath shape() const
+ {
+ QPainterPath path;
+ path.addEllipse(boundingRect());
+ return path;
+ }
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
+ {
+ bool down = option->state & QStyle::State_Sunken;
+ QRectF r = boundingRect();
+ QLinearGradient grad(r.topLeft(), r.bottomRight());
+ grad.setColorAt(down ? 1 : 0, option->state & QStyle::State_MouseOver ? Qt::white : Qt::lightGray);
+ grad.setColorAt(down ? 0 : 1, Qt::darkGray);
+ painter->setPen(Qt::darkGray);
+ painter->setBrush(grad);
+ painter->drawEllipse(r);
+ QLinearGradient grad2(r.topLeft(), r.bottomRight());
+ grad.setColorAt(down ? 1 : 0, Qt::darkGray);
+ grad.setColorAt(down ? 0 : 1, Qt::lightGray);
+ painter->setPen(Qt::NoPen);
+ painter->setBrush(grad);
+ if (down)
+ painter->translate(2, 2);
+ painter->drawEllipse(r.adjusted(5, 5, -5, -5));
+ painter->drawPixmap(-_pix.width()/2, -_pix.height()/2, _pix);
+ }
+
+signals:
+ void pressed();
+
+protected:
+ void mousePressEvent(QGraphicsSceneMouseEvent *)
+ {
+ emit pressed();
+ update();
+ }
+
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *)
+ {
+ update();
+ }
+
+private:
+ QPixmap _pix;
+};
+
+class View : public QGraphicsView
+{
+public:
+ View(QGraphicsScene *scene) : QGraphicsView(scene) { }
+
+protected:
+ void resizeEvent(QResizeEvent *event)
+ {
+ QGraphicsView::resizeEvent(event);
+ fitInView(sceneRect(), Qt::KeepAspectRatio);
+ }
+};
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(animatedtiles);
+
+ QApplication app(argc, argv);
+
+ QPixmap kineticPix(":/images/kinetic.png");
+ QPixmap bgPix(":/images/Time-For-Lunch-2.jpg");
+
+ QGraphicsScene scene(-350, -350, 700, 700);
+
+ QList<Pixmap *> items;
+ for (int i = 0; i < 64; ++i) {
+ Pixmap *item = new Pixmap(kineticPix);
+ item->setOffset(-kineticPix.width()/2, -kineticPix.height()/2);
+ item->setZValue(i);
+ items << item;
+ scene.addItem(item);
+ }
+
+ // Buttons
+ QGraphicsItem *buttonParent = new QGraphicsRectItem;
+ Button *ellipseButton = new Button(QPixmap(":/images/ellipse.png"), buttonParent);
+ Button *figure8Button = new Button(QPixmap(":/images/figure8.png"), buttonParent);
+ Button *randomButton = new Button(QPixmap(":/images/random.png"), buttonParent);
+ Button *tiledButton = new Button(QPixmap(":/images/tile.png"), buttonParent);
+ Button *centeredButton = new Button(QPixmap(":/images/centered.png"), buttonParent);
+
+ ellipseButton->setPos(-100, -100);
+ figure8Button->setPos(100, -100);
+ randomButton->setPos(0, 0);
+ tiledButton->setPos(-100, 100);
+ centeredButton->setPos(100, 100);
+
+ scene.addItem(buttonParent);
+ buttonParent->setTransform(QTransform::fromScale(0.75, 0.75), true);
+ buttonParent->setPos(200, 200);
+ buttonParent->setZValue(65);
+
+ // States
+ QState *rootState = new QState;
+ QState *ellipseState = new QState(rootState);
+ QState *figure8State = new QState(rootState);
+ QState *randomState = new QState(rootState);
+ QState *tiledState = new QState(rootState);
+ QState *centeredState = new QState(rootState);
+
+ // Values
+ for (int i = 0; i < items.count(); ++i) {
+ Pixmap *item = items.at(i);
+ // Ellipse
+ ellipseState->assignProperty(item, "pos",
+ QPointF(cos((i / 63.0) * 6.28) * 250,
+ sin((i / 63.0) * 6.28) * 250));
+
+ // Figure 8
+ figure8State->assignProperty(item, "pos",
+ QPointF(sin((i / 63.0) * 6.28) * 250,
+ sin(((i * 2)/63.0) * 6.28) * 250));
+
+ // Random
+ randomState->assignProperty(item, "pos",
+ QPointF(-250 + qrand() % 500,
+ -250 + qrand() % 500));
+
+ // Tiled
+ tiledState->assignProperty(item, "pos",
+ QPointF(((i % 8) - 4) * kineticPix.width() + kineticPix.width() / 2,
+ ((i / 8) - 4) * kineticPix.height() + kineticPix.height() / 2));
+
+ // Centered
+ centeredState->assignProperty(item, "pos", QPointF());
+ }
+
+ // Ui
+ View *view = new View(&scene);
+ view->setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Animated Tiles"));
+ view->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
+ view->setBackgroundBrush(bgPix);
+ view->setCacheMode(QGraphicsView::CacheBackground);
+ view->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
+ view->show();
+
+ QStateMachine states;
+ states.addState(rootState);
+ states.setInitialState(rootState);
+ rootState->setInitialState(centeredState);
+
+ QParallelAnimationGroup *group = new QParallelAnimationGroup;
+ for (int i = 0; i < items.count(); ++i) {
+ QPropertyAnimation *anim = new QPropertyAnimation(items[i], "pos");
+ anim->setDuration(750 + i * 25);
+ anim->setEasingCurve(QEasingCurve::InOutBack);
+ group->addAnimation(anim);
+ }
+ QAbstractTransition *trans = rootState->addTransition(ellipseButton, SIGNAL(pressed()), ellipseState);
+ trans->addAnimation(group);
+
+ trans = rootState->addTransition(figure8Button, SIGNAL(pressed()), figure8State);
+ trans->addAnimation(group);
+
+ trans = rootState->addTransition(randomButton, SIGNAL(pressed()), randomState);
+ trans->addAnimation(group);
+
+ trans = rootState->addTransition(tiledButton, SIGNAL(pressed()), tiledState);
+ trans->addAnimation(group);
+
+ trans = rootState->addTransition(centeredButton, SIGNAL(pressed()), centeredState);
+ trans->addAnimation(group);
+
+ QTimer timer;
+ timer.start(125);
+ timer.setSingleShot(true);
+ trans = rootState->addTransition(&timer, SIGNAL(timeout()), ellipseState);
+ trans->addAnimation(group);
+
+ states.start();
+
+#ifdef QT_KEYPAD_NAVIGATION
+ QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
+#endif
+ return app.exec();
+}
+
+#include "main.moc"
diff --git a/examples/widgets/animation/animation.pro b/examples/widgets/animation/animation.pro
new file mode 100644
index 0000000000..b17aa0e0fe
--- /dev/null
+++ b/examples/widgets/animation/animation.pro
@@ -0,0 +1,17 @@
+TEMPLATE = \
+ subdirs
+SUBDIRS += \
+ animatedtiles \
+ appchooser \
+ easing \
+ moveblocks \
+ states \
+ stickman \
+ sub-attaq \
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS animation.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation
+INSTALLS += target sources
+QT += widgets
diff --git a/examples/widgets/animation/appchooser/accessories-dictionary.png b/examples/widgets/animation/appchooser/accessories-dictionary.png
new file mode 100644
index 0000000000..e9bd55d918
--- /dev/null
+++ b/examples/widgets/animation/appchooser/accessories-dictionary.png
Binary files differ
diff --git a/examples/widgets/animation/appchooser/akregator.png b/examples/widgets/animation/appchooser/akregator.png
new file mode 100644
index 0000000000..a086f45ab6
--- /dev/null
+++ b/examples/widgets/animation/appchooser/akregator.png
Binary files differ
diff --git a/examples/widgets/animation/appchooser/appchooser.desktop b/examples/widgets/animation/appchooser/appchooser.desktop
new file mode 100644
index 0000000000..8e413e96c2
--- /dev/null
+++ b/examples/widgets/animation/appchooser/appchooser.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Application Chooser
+Exec=/opt/usr/bin/appchooser
+Icon=appchooser
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/animation/appchooser/appchooser.pro b/examples/widgets/animation/appchooser/appchooser.pro
new file mode 100644
index 0000000000..158a0eca9f
--- /dev/null
+++ b/examples/widgets/animation/appchooser/appchooser.pro
@@ -0,0 +1,10 @@
+SOURCES = main.cpp
+RESOURCES = appchooser.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/appchooser
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS appchooser.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/appchooser
+INSTALLS += target sources
+
+QT += widgets
diff --git a/examples/widgets/animation/appchooser/appchooser.qrc b/examples/widgets/animation/appchooser/appchooser.qrc
new file mode 100644
index 0000000000..28a3e1c4c1
--- /dev/null
+++ b/examples/widgets/animation/appchooser/appchooser.qrc
@@ -0,0 +1,8 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>accessories-dictionary.png</file>
+ <file>akregator.png</file>
+ <file>digikam.png</file>
+ <file>k3b.png</file>
+</qresource>
+</RCC>
diff --git a/examples/widgets/animation/appchooser/digikam.png b/examples/widgets/animation/appchooser/digikam.png
new file mode 100644
index 0000000000..9de9fb2f80
--- /dev/null
+++ b/examples/widgets/animation/appchooser/digikam.png
Binary files differ
diff --git a/examples/widgets/animation/appchooser/k3b.png b/examples/widgets/animation/appchooser/k3b.png
new file mode 100644
index 0000000000..bbcafcfba1
--- /dev/null
+++ b/examples/widgets/animation/appchooser/k3b.png
Binary files differ
diff --git a/examples/widgets/animation/appchooser/main.cpp b/examples/widgets/animation/appchooser/main.cpp
new file mode 100644
index 0000000000..c8e60c0641
--- /dev/null
+++ b/examples/widgets/animation/appchooser/main.cpp
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+#include <QtWidgets>
+
+
+class Pixmap : public QGraphicsWidget
+{
+ Q_OBJECT
+
+public:
+ Pixmap(const QPixmap &pix, QGraphicsItem *parent = 0)
+ : QGraphicsWidget(parent), orig(pix), p(pix)
+ {
+ }
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ {
+ painter->drawPixmap(QPointF(), p);
+ }
+
+ virtual void mousePressEvent(QGraphicsSceneMouseEvent * )
+ {
+ emit clicked();
+ }
+
+ virtual void setGeometry(const QRectF &rect)
+ {
+ QGraphicsWidget::setGeometry(rect);
+
+ if (rect.size().width() > orig.size().width())
+ p = orig.scaled(rect.size().toSize());
+ else
+ p = orig;
+ }
+
+Q_SIGNALS:
+ void clicked();
+
+private:
+ QPixmap orig;
+ QPixmap p;
+};
+
+class GraphicsView : public QGraphicsView
+{
+ Q_OBJECT
+public:
+ GraphicsView(QGraphicsScene *scene, QWidget *parent = 0) : QGraphicsView(scene, parent)
+ {
+ }
+
+ virtual void resizeEvent(QResizeEvent *)
+ {
+ fitInView(sceneRect(), Qt::KeepAspectRatio);
+ }
+};
+
+
+void createStates(const QObjectList &objects,
+ const QRect &selectedRect, QState *parent)
+{
+ for (int i = 0; i < objects.size(); ++i) {
+ QState *state = new QState(parent);
+ state->assignProperty(objects.at(i), "geometry", selectedRect);
+ parent->addTransition(objects.at(i), SIGNAL(clicked()), state);
+ }
+}
+
+void createAnimations(const QObjectList &objects, QStateMachine *machine)
+{
+ for (int i=0; i<objects.size(); ++i)
+ machine->addDefaultAnimation(new QPropertyAnimation(objects.at(i), "geometry"));
+}
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(appchooser);
+
+ QApplication app(argc, argv);
+
+ Pixmap *p1 = new Pixmap(QPixmap(":/digikam.png"));
+ Pixmap *p2 = new Pixmap(QPixmap(":/akregator.png"));
+ Pixmap *p3 = new Pixmap(QPixmap(":/accessories-dictionary.png"));
+ Pixmap *p4 = new Pixmap(QPixmap(":/k3b.png"));
+
+ p1->setObjectName("p1");
+ p2->setObjectName("p2");
+ p3->setObjectName("p3");
+ p4->setObjectName("p4");
+
+ p1->setGeometry(QRectF( 0.0, 0.0, 64.0, 64.0));
+ p2->setGeometry(QRectF(236.0, 0.0, 64.0, 64.0));
+ p3->setGeometry(QRectF(236.0, 236.0, 64.0, 64.0));
+ p4->setGeometry(QRectF( 0.0, 236.0, 64.0, 64.0));
+
+ QGraphicsScene scene(0, 0, 300, 300);
+ scene.setBackgroundBrush(Qt::white);
+ scene.addItem(p1);
+ scene.addItem(p2);
+ scene.addItem(p3);
+ scene.addItem(p4);
+
+ GraphicsView window(&scene);
+ window.setFrameStyle(0);
+ window.setAlignment(Qt::AlignLeft | Qt::AlignTop);
+ window.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ window.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+
+ QStateMachine machine;
+ machine.setGlobalRestorePolicy(QState::RestoreProperties);
+
+ QState *group = new QState(&machine);
+ group->setObjectName("group");
+
+ QRect selectedRect(86, 86, 128, 128);
+
+ QState *idleState = new QState(group);
+ group->setInitialState(idleState);
+
+ QObjectList objects;
+ objects << p1 << p2 << p3 << p4;
+ createStates(objects, selectedRect, group);
+ createAnimations(objects, &machine);
+
+ machine.setInitialState(group);
+ machine.start();
+
+ window.resize(300, 300);
+ window.show();
+
+ return app.exec();
+}
+
+#include "main.moc"
diff --git a/examples/widgets/animation/easing/animation.h b/examples/widgets/animation/easing/animation.h
new file mode 100644
index 0000000000..35cbed4555
--- /dev/null
+++ b/examples/widgets/animation/easing/animation.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ANIMATION_H
+#define ANIMATION_H
+
+#include <QtWidgets>
+
+#include <QtCore/qpropertyanimation.h>
+
+class Animation : public QPropertyAnimation {
+public:
+ enum PathType {
+ LinearPath,
+ CirclePath,
+ NPathTypes
+ };
+ Animation(QObject *target, const QByteArray &prop)
+ : QPropertyAnimation(target, prop)
+ {
+ setPathType(LinearPath);
+ }
+
+ void setPathType(PathType pathType)
+ {
+ if (pathType >= NPathTypes)
+ qWarning("Unknown pathType %d", pathType);
+
+ m_pathType = pathType;
+ m_path = QPainterPath();
+ }
+
+ void updateCurrentTime(int currentTime)
+ {
+ if (m_pathType == CirclePath) {
+ if (m_path.isEmpty()) {
+ QPointF to = endValue().toPointF();
+ QPointF from = startValue().toPointF();
+ m_path.moveTo(from);
+ m_path.addEllipse(QRectF(from, to));
+ }
+ int dura = duration();
+ const qreal progress = ((dura == 0) ? 1 : ((((currentTime - 1) % dura) + 1) / qreal(dura)));
+
+ qreal easedProgress = easingCurve().valueForProgress(progress);
+ if (easedProgress > 1.0) {
+ easedProgress -= 1.0;
+ } else if (easedProgress < 0) {
+ easedProgress += 1.0;
+ }
+ QPointF pt = m_path.pointAtPercent(easedProgress);
+ updateCurrentValue(pt);
+ emit valueChanged(pt);
+ } else {
+ QPropertyAnimation::updateCurrentTime(currentTime);
+ }
+ }
+
+ QPainterPath m_path;
+ PathType m_pathType;
+};
+
+#endif // ANIMATION_H
diff --git a/examples/widgets/animation/easing/easing.desktop b/examples/widgets/animation/easing/easing.desktop
new file mode 100644
index 0000000000..56d122217a
--- /dev/null
+++ b/examples/widgets/animation/easing/easing.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Easing Curves
+Exec=/opt/usr/bin/easing
+Icon=easing
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/animation/easing/easing.pro b/examples/widgets/animation/easing/easing.pro
new file mode 100644
index 0000000000..155d17d9b9
--- /dev/null
+++ b/examples/widgets/animation/easing/easing.pro
@@ -0,0 +1,17 @@
+HEADERS = window.h \
+ animation.h
+SOURCES = main.cpp \
+ window.cpp
+
+FORMS = form.ui
+
+RESOURCES = easing.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/easing
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS easing.pro images
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/easing
+INSTALLS += target sources
+
+QT += widgets
+
diff --git a/examples/widgets/animation/easing/easing.qrc b/examples/widgets/animation/easing/easing.qrc
new file mode 100644
index 0000000000..7e112d3a9d
--- /dev/null
+++ b/examples/widgets/animation/easing/easing.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>images/qt-logo.png</file>
+ </qresource>
+ </RCC> \ No newline at end of file
diff --git a/examples/widgets/animation/easing/form.ui b/examples/widgets/animation/easing/form.ui
new file mode 100644
index 0000000000..364aebeda6
--- /dev/null
+++ b/examples/widgets/animation/easing/form.ui
@@ -0,0 +1,270 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Form</class>
+ <widget class="QWidget" name="Form">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>545</width>
+ <height>471</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Easing curves</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0" colspan="2">
+ <widget class="QListWidget" name="easingCurvePicker">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="verticalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="movement">
+ <enum>QListView::Static</enum>
+ </property>
+ <property name="isWrapping" stdset="0">
+ <bool>false</bool>
+ </property>
+ <property name="viewMode">
+ <enum>QListView::IconMode</enum>
+ </property>
+ <property name="selectionRectVisible">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Path type</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QRadioButton" name="lineRadio">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>40</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text">
+ <string>Line</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QRadioButton" name="circleRadio">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>40</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Circle</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string>buttonGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Properties</string>
+ </property>
+ <layout class="QFormLayout" name="formLayout">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Period</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QDoubleSpinBox" name="periodSpinBox">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="minimum">
+ <double>-1.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.100000000000000</double>
+ </property>
+ <property name="value">
+ <double>-1.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QDoubleSpinBox" name="amplitudeSpinBox">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="minimum">
+ <double>-1.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.100000000000000</double>
+ </property>
+ <property name="value">
+ <double>-1.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Overshoot</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QDoubleSpinBox" name="overshootSpinBox">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="minimum">
+ <double>-1.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.100000000000000</double>
+ </property>
+ <property name="value">
+ <double>-1.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Amplitude</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="1">
+ <widget class="QGraphicsView" name="graphicsView">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+ <buttongroups>
+ <buttongroup name="buttonGroup"/>
+ </buttongroups>
+</ui>
diff --git a/examples/widgets/animation/easing/images/qt-logo.png b/examples/widgets/animation/easing/images/qt-logo.png
new file mode 100644
index 0000000000..14ddf2a028
--- /dev/null
+++ b/examples/widgets/animation/easing/images/qt-logo.png
Binary files differ
diff --git a/examples/widgets/animation/easing/main.cpp b/examples/widgets/animation/easing/main.cpp
new file mode 100644
index 0000000000..05d4014fc2
--- /dev/null
+++ b/examples/widgets/animation/easing/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtWidgets>
+#include "window.h"
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(easing);
+ QApplication app(argc, argv);
+ Window w;
+
+ w.resize(400, 400);
+ w.show();
+
+ return app.exec();
+}
diff --git a/examples/widgets/animation/easing/window.cpp b/examples/widgets/animation/easing/window.cpp
new file mode 100644
index 0000000000..33468db59c
--- /dev/null
+++ b/examples/widgets/animation/easing/window.cpp
@@ -0,0 +1,177 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "window.h"
+
+Window::Window(QWidget *parent)
+ : QWidget(parent),
+ m_iconSize(64, 64)
+{
+ m_ui.setupUi(this);
+ QButtonGroup *buttonGroup = findChild<QButtonGroup *>(); // ### workaround for uic in 4.4
+ m_ui.easingCurvePicker->setIconSize(m_iconSize);
+ m_ui.easingCurvePicker->setMinimumHeight(m_iconSize.height() + 50);
+ buttonGroup->setId(m_ui.lineRadio, 0);
+ buttonGroup->setId(m_ui.circleRadio, 1);
+
+ QEasingCurve dummy;
+ m_ui.periodSpinBox->setValue(dummy.period());
+ m_ui.amplitudeSpinBox->setValue(dummy.amplitude());
+ m_ui.overshootSpinBox->setValue(dummy.overshoot());
+
+ connect(m_ui.easingCurvePicker, SIGNAL(currentRowChanged(int)), this, SLOT(curveChanged(int)));
+ connect(buttonGroup, SIGNAL(buttonClicked(int)), this, SLOT(pathChanged(int)));
+ connect(m_ui.periodSpinBox, SIGNAL(valueChanged(double)), this, SLOT(periodChanged(double)));
+ connect(m_ui.amplitudeSpinBox, SIGNAL(valueChanged(double)), this, SLOT(amplitudeChanged(double)));
+ connect(m_ui.overshootSpinBox, SIGNAL(valueChanged(double)), this, SLOT(overshootChanged(double)));
+ createCurveIcons();
+
+ QPixmap pix(QLatin1String(":/images/qt-logo.png"));
+ m_item = new PixmapItem(pix);
+ m_scene.addItem(m_item);
+ m_ui.graphicsView->setScene(&m_scene);
+
+ m_anim = new Animation(m_item, "pos");
+ m_anim->setEasingCurve(QEasingCurve::OutBounce);
+ m_ui.easingCurvePicker->setCurrentRow(int(QEasingCurve::OutBounce));
+
+ startAnimation();
+}
+
+void Window::createCurveIcons()
+{
+ QPixmap pix(m_iconSize);
+ QPainter painter(&pix);
+ QLinearGradient gradient(0,0, 0, m_iconSize.height());
+ gradient.setColorAt(0.0, QColor(240, 240, 240));
+ gradient.setColorAt(1.0, QColor(224, 224, 224));
+ QBrush brush(gradient);
+ const QMetaObject &mo = QEasingCurve::staticMetaObject;
+ QMetaEnum metaEnum = mo.enumerator(mo.indexOfEnumerator("Type"));
+ // Skip QEasingCurve::Custom
+ for (int i = 0; i < QEasingCurve::NCurveTypes - 1; ++i) {
+ painter.fillRect(QRect(QPoint(0, 0), m_iconSize), brush);
+ QEasingCurve curve((QEasingCurve::Type)i);
+ painter.setPen(QColor(0, 0, 255, 64));
+ qreal xAxis = m_iconSize.height()/1.5;
+ qreal yAxis = m_iconSize.width()/3;
+ painter.drawLine(0, xAxis, m_iconSize.width(), xAxis);
+ painter.drawLine(yAxis, 0, yAxis, m_iconSize.height());
+
+ qreal curveScale = m_iconSize.height()/2;
+
+ painter.setPen(Qt::NoPen);
+
+ // start point
+ painter.setBrush(Qt::red);
+ QPoint start(yAxis, xAxis - curveScale * curve.valueForProgress(0));
+ painter.drawRect(start.x() - 1, start.y() - 1, 3, 3);
+
+ // end point
+ painter.setBrush(Qt::blue);
+ QPoint end(yAxis + curveScale, xAxis - curveScale * curve.valueForProgress(1));
+ painter.drawRect(end.x() - 1, end.y() - 1, 3, 3);
+
+ QPainterPath curvePath;
+ curvePath.moveTo(start);
+ for (qreal t = 0; t <= 1.0; t+=1.0/curveScale) {
+ QPoint to;
+ to.setX(yAxis + curveScale * t);
+ to.setY(xAxis - curveScale * curve.valueForProgress(t));
+ curvePath.lineTo(to);
+ }
+ painter.setRenderHint(QPainter::Antialiasing, true);
+ painter.strokePath(curvePath, QColor(32, 32, 32));
+ painter.setRenderHint(QPainter::Antialiasing, false);
+ QListWidgetItem *item = new QListWidgetItem;
+ item->setIcon(QIcon(pix));
+ item->setText(metaEnum.key(i));
+ m_ui.easingCurvePicker->addItem(item);
+ }
+}
+
+void Window::startAnimation()
+{
+ m_anim->setStartValue(QPointF(0, 0));
+ m_anim->setEndValue(QPointF(100, 100));
+ m_anim->setDuration(2000);
+ m_anim->setLoopCount(-1); // forever
+ m_anim->start();
+}
+
+void Window::curveChanged(int row)
+{
+ QEasingCurve::Type curveType = (QEasingCurve::Type)row;
+ m_anim->setEasingCurve(curveType);
+ m_anim->setCurrentTime(0);
+
+ bool isElastic = curveType >= QEasingCurve::InElastic && curveType <= QEasingCurve::OutInElastic;
+ bool isBounce = curveType >= QEasingCurve::InBounce && curveType <= QEasingCurve::OutInBounce;
+ m_ui.periodSpinBox->setEnabled(isElastic);
+ m_ui.amplitudeSpinBox->setEnabled(isElastic || isBounce);
+ m_ui.overshootSpinBox->setEnabled(curveType >= QEasingCurve::InBack && curveType <= QEasingCurve::OutInBack);
+}
+
+void Window::pathChanged(int index)
+{
+ m_anim->setPathType((Animation::PathType)index);
+}
+
+void Window::periodChanged(double value)
+{
+ QEasingCurve curve = m_anim->easingCurve();
+ curve.setPeriod(value);
+ m_anim->setEasingCurve(curve);
+}
+
+void Window::amplitudeChanged(double value)
+{
+ QEasingCurve curve = m_anim->easingCurve();
+ curve.setAmplitude(value);
+ m_anim->setEasingCurve(curve);
+}
+
+void Window::overshootChanged(double value)
+{
+ QEasingCurve curve = m_anim->easingCurve();
+ curve.setOvershoot(value);
+ m_anim->setEasingCurve(curve);
+}
+
diff --git a/examples/widgets/animation/easing/window.h b/examples/widgets/animation/easing/window.h
new file mode 100644
index 0000000000..bf5014c0cc
--- /dev/null
+++ b/examples/widgets/animation/easing/window.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtWidgets>
+
+#include "ui_form.h"
+#include "animation.h"
+
+class PixmapItem : public QObject, public QGraphicsPixmapItem
+{
+ Q_OBJECT
+ Q_PROPERTY(QPointF pos READ pos WRITE setPos)
+public:
+ PixmapItem(const QPixmap &pix) : QGraphicsPixmapItem(pix)
+ {
+ }
+};
+
+class Window : public QWidget {
+ Q_OBJECT
+public:
+ Window(QWidget *parent = 0);
+private slots:
+ void curveChanged(int row);
+ void pathChanged(int index);
+ void periodChanged(double);
+ void amplitudeChanged(double);
+ void overshootChanged(double);
+
+private:
+ void createCurveIcons();
+ void startAnimation();
+
+ Ui::Form m_ui;
+ QGraphicsScene m_scene;
+ PixmapItem *m_item;
+ Animation *m_anim;
+ QSize m_iconSize;
+};
diff --git a/examples/widgets/animation/moveblocks/main.cpp b/examples/widgets/animation/moveblocks/main.cpp
new file mode 100644
index 0000000000..d807bb63d9
--- /dev/null
+++ b/examples/widgets/animation/moveblocks/main.cpp
@@ -0,0 +1,321 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+#include <QtWidgets>
+
+//![15]
+class StateSwitchEvent: public QEvent
+{
+public:
+ StateSwitchEvent()
+ : QEvent(Type(StateSwitchType))
+ {
+ }
+
+ explicit StateSwitchEvent(int rand)
+ : QEvent(Type(StateSwitchType)),
+ m_rand(rand)
+ {
+ }
+
+ enum { StateSwitchType = QEvent::User + 256 };
+
+ int rand() const { return m_rand; }
+
+private:
+ int m_rand;
+};
+//![15]
+
+//![16]
+class QGraphicsRectWidget : public QGraphicsWidget
+{
+public:
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *,
+ QWidget *)
+ {
+ painter->fillRect(rect(), Qt::blue);
+ }
+};
+//![16]
+
+class StateSwitchTransition: public QAbstractTransition
+{
+public:
+ StateSwitchTransition(int rand)
+ : QAbstractTransition(),
+ m_rand(rand)
+ {
+ }
+
+protected:
+//![14]
+ virtual bool eventTest(QEvent *event)
+ {
+ return (event->type() == QEvent::Type(StateSwitchEvent::StateSwitchType))
+ && (static_cast<StateSwitchEvent *>(event)->rand() == m_rand);
+ }
+//![14]
+
+ virtual void onTransition(QEvent *) {}
+
+private:
+ int m_rand;
+};
+
+//![10]
+class StateSwitcher : public QState
+{
+ Q_OBJECT
+public:
+ StateSwitcher(QStateMachine *machine)
+ : QState(machine), m_stateCount(0), m_lastIndex(0)
+ { }
+//![10]
+
+//![11]
+ virtual void onEntry(QEvent *)
+ {
+ int n;
+ while ((n = (qrand() % m_stateCount + 1)) == m_lastIndex)
+ { }
+ m_lastIndex = n;
+ machine()->postEvent(new StateSwitchEvent(n));
+ }
+ virtual void onExit(QEvent *) {}
+//![11]
+
+//![12]
+ void addState(QState *state, QAbstractAnimation *animation) {
+ StateSwitchTransition *trans = new StateSwitchTransition(++m_stateCount);
+ trans->setTargetState(state);
+ addTransition(trans);
+ trans->addAnimation(animation);
+ }
+//![12]
+
+private:
+ int m_stateCount;
+ int m_lastIndex;
+};
+
+//![13]
+QState *createGeometryState(QObject *w1, const QRect &rect1,
+ QObject *w2, const QRect &rect2,
+ QObject *w3, const QRect &rect3,
+ QObject *w4, const QRect &rect4,
+ QState *parent)
+{
+ QState *result = new QState(parent);
+ result->assignProperty(w1, "geometry", rect1);
+ result->assignProperty(w2, "geometry", rect2);
+ result->assignProperty(w3, "geometry", rect3);
+ result->assignProperty(w4, "geometry", rect4);
+
+ return result;
+}
+//![13]
+
+
+class GraphicsView : public QGraphicsView
+{
+ Q_OBJECT
+public:
+ GraphicsView(QGraphicsScene *scene, QWidget *parent = NULL) : QGraphicsView(scene, parent)
+ {
+ }
+
+protected:
+ virtual void resizeEvent(QResizeEvent *event)
+ {
+ fitInView(scene()->sceneRect());
+ QGraphicsView::resizeEvent(event);
+ }
+};
+
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+//![1]
+ QGraphicsRectWidget *button1 = new QGraphicsRectWidget;
+ QGraphicsRectWidget *button2 = new QGraphicsRectWidget;
+ QGraphicsRectWidget *button3 = new QGraphicsRectWidget;
+ QGraphicsRectWidget *button4 = new QGraphicsRectWidget;
+ button2->setZValue(1);
+ button3->setZValue(2);
+ button4->setZValue(3);
+ QGraphicsScene scene(0, 0, 300, 300);
+ scene.setBackgroundBrush(Qt::black);
+ scene.addItem(button1);
+ scene.addItem(button2);
+ scene.addItem(button3);
+ scene.addItem(button4);
+//![1]
+ GraphicsView window(&scene);
+ window.setFrameStyle(0);
+ window.setAlignment(Qt::AlignLeft | Qt::AlignTop);
+ window.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ window.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+//![2]
+ QStateMachine machine;
+
+ QState *group = new QState();
+ group->setObjectName("group");
+ QTimer timer;
+ timer.setInterval(1250);
+ timer.setSingleShot(true);
+ QObject::connect(group, SIGNAL(entered()), &timer, SLOT(start()));
+//![2]
+
+//![3]
+ QState *state1;
+ QState *state2;
+ QState *state3;
+ QState *state4;
+ QState *state5;
+ QState *state6;
+ QState *state7;
+
+ state1 = createGeometryState(button1, QRect(100, 0, 50, 50),
+ button2, QRect(150, 0, 50, 50),
+ button3, QRect(200, 0, 50, 50),
+ button4, QRect(250, 0, 50, 50),
+ group);
+//![3]
+ state2 = createGeometryState(button1, QRect(250, 100, 50, 50),
+ button2, QRect(250, 150, 50, 50),
+ button3, QRect(250, 200, 50, 50),
+ button4, QRect(250, 250, 50, 50),
+ group);
+ state3 = createGeometryState(button1, QRect(150, 250, 50, 50),
+ button2, QRect(100, 250, 50, 50),
+ button3, QRect(50, 250, 50, 50),
+ button4, QRect(0, 250, 50, 50),
+ group);
+ state4 = createGeometryState(button1, QRect(0, 150, 50, 50),
+ button2, QRect(0, 100, 50, 50),
+ button3, QRect(0, 50, 50, 50),
+ button4, QRect(0, 0, 50, 50),
+ group);
+ state5 = createGeometryState(button1, QRect(100, 100, 50, 50),
+ button2, QRect(150, 100, 50, 50),
+ button3, QRect(100, 150, 50, 50),
+ button4, QRect(150, 150, 50, 50),
+ group);
+ state6 = createGeometryState(button1, QRect(50, 50, 50, 50),
+ button2, QRect(200, 50, 50, 50),
+ button3, QRect(50, 200, 50, 50),
+ button4, QRect(200, 200, 50, 50),
+ group);
+//![4]
+ state7 = createGeometryState(button1, QRect(0, 0, 50, 50),
+ button2, QRect(250, 0, 50, 50),
+ button3, QRect(0, 250, 50, 50),
+ button4, QRect(250, 250, 50, 50),
+ group);
+ group->setInitialState(state1);
+//![4]
+
+//![5]
+ QParallelAnimationGroup animationGroup;
+ QSequentialAnimationGroup *subGroup;
+
+ QPropertyAnimation *anim = new QPropertyAnimation(button4, "geometry");
+ anim->setDuration(1000);
+ anim->setEasingCurve(QEasingCurve::OutElastic);
+ animationGroup.addAnimation(anim);
+//![5]
+
+//![6]
+ subGroup = new QSequentialAnimationGroup(&animationGroup);
+ subGroup->addPause(100);
+ anim = new QPropertyAnimation(button3, "geometry");
+ anim->setDuration(1000);
+ anim->setEasingCurve(QEasingCurve::OutElastic);
+ subGroup->addAnimation(anim);
+//![6]
+
+ subGroup = new QSequentialAnimationGroup(&animationGroup);
+ subGroup->addPause(150);
+ anim = new QPropertyAnimation(button2, "geometry");
+ anim->setDuration(1000);
+ anim->setEasingCurve(QEasingCurve::OutElastic);
+ subGroup->addAnimation(anim);
+
+ subGroup = new QSequentialAnimationGroup(&animationGroup);
+ subGroup->addPause(200);
+ anim = new QPropertyAnimation(button1, "geometry");
+ anim->setDuration(1000);
+ anim->setEasingCurve(QEasingCurve::OutElastic);
+ subGroup->addAnimation(anim);
+
+//![7]
+ StateSwitcher *stateSwitcher = new StateSwitcher(&machine);
+ stateSwitcher->setObjectName("stateSwitcher");
+ group->addTransition(&timer, SIGNAL(timeout()), stateSwitcher);
+ stateSwitcher->addState(state1, &animationGroup);
+ stateSwitcher->addState(state2, &animationGroup);
+//![7]
+ stateSwitcher->addState(state3, &animationGroup);
+ stateSwitcher->addState(state4, &animationGroup);
+ stateSwitcher->addState(state5, &animationGroup);
+ stateSwitcher->addState(state6, &animationGroup);
+//![8]
+ stateSwitcher->addState(state7, &animationGroup);
+//![8]
+
+//![9]
+ machine.addState(group);
+ machine.setInitialState(group);
+ machine.start();
+//![9]
+
+ window.resize(300, 300);
+ window.show();
+
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+
+ return app.exec();
+}
+
+#include "main.moc"
diff --git a/examples/widgets/animation/moveblocks/moveblocks.desktop b/examples/widgets/animation/moveblocks/moveblocks.desktop
new file mode 100644
index 0000000000..4100f448df
--- /dev/null
+++ b/examples/widgets/animation/moveblocks/moveblocks.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Move Blocks
+Exec=/opt/usr/bin/moveblocks
+Icon=moveblocks
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/animation/moveblocks/moveblocks.pro b/examples/widgets/animation/moveblocks/moveblocks.pro
new file mode 100644
index 0000000000..7c242e31e6
--- /dev/null
+++ b/examples/widgets/animation/moveblocks/moveblocks.pro
@@ -0,0 +1,9 @@
+SOURCES = main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/moveblocks
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS moveblocks.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/moveblocks
+INSTALLS += target sources
+
+QT += widgets
diff --git a/examples/widgets/animation/states/accessories-dictionary.png b/examples/widgets/animation/states/accessories-dictionary.png
new file mode 100644
index 0000000000..e9bd55d918
--- /dev/null
+++ b/examples/widgets/animation/states/accessories-dictionary.png
Binary files differ
diff --git a/examples/widgets/animation/states/akregator.png b/examples/widgets/animation/states/akregator.png
new file mode 100644
index 0000000000..a086f45ab6
--- /dev/null
+++ b/examples/widgets/animation/states/akregator.png
Binary files differ
diff --git a/examples/widgets/animation/states/digikam.png b/examples/widgets/animation/states/digikam.png
new file mode 100644
index 0000000000..9de9fb2f80
--- /dev/null
+++ b/examples/widgets/animation/states/digikam.png
Binary files differ
diff --git a/examples/widgets/animation/states/help-browser.png b/examples/widgets/animation/states/help-browser.png
new file mode 100644
index 0000000000..db92faa4e7
--- /dev/null
+++ b/examples/widgets/animation/states/help-browser.png
Binary files differ
diff --git a/examples/widgets/animation/states/k3b.png b/examples/widgets/animation/states/k3b.png
new file mode 100644
index 0000000000..bbcafcfba1
--- /dev/null
+++ b/examples/widgets/animation/states/k3b.png
Binary files differ
diff --git a/examples/widgets/animation/states/kchart.png b/examples/widgets/animation/states/kchart.png
new file mode 100644
index 0000000000..1dd115be87
--- /dev/null
+++ b/examples/widgets/animation/states/kchart.png
Binary files differ
diff --git a/examples/widgets/animation/states/main.cpp b/examples/widgets/animation/states/main.cpp
new file mode 100644
index 0000000000..faa97ccbd0
--- /dev/null
+++ b/examples/widgets/animation/states/main.cpp
@@ -0,0 +1,285 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtWidgets>
+
+class Pixmap : public QGraphicsObject
+{
+ Q_OBJECT
+public:
+ Pixmap(const QPixmap &pix) : QGraphicsObject(), p(pix)
+ {
+ }
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ {
+ painter->drawPixmap(QPointF(), p);
+ }
+
+ QRectF boundingRect() const
+ {
+ return QRectF( QPointF(0, 0), p.size());
+ }
+
+private:
+ QPixmap p;
+};
+
+class GraphicsView : public QGraphicsView
+{
+public:
+ GraphicsView(QGraphicsScene *scene) : QGraphicsView(scene)
+ {
+ }
+
+ virtual void resizeEvent(QResizeEvent *)
+ {
+ fitInView(sceneRect(), Qt::KeepAspectRatio);
+ }
+};
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(states);
+
+ QApplication app(argc, argv);
+
+ // Text edit and button
+ QTextEdit *edit = new QTextEdit;
+ edit->setText("asdf lkjha yuoiqwe asd iuaysd u iasyd uiy "
+ "asdf lkjha yuoiqwe asd iuaysd u iasyd uiy "
+ "asdf lkjha yuoiqwe asd iuaysd u iasyd uiy "
+ "asdf lkjha yuoiqwe asd iuaysd u iasyd uiy!");
+
+ QPushButton *button = new QPushButton;
+ QGraphicsProxyWidget *buttonProxy = new QGraphicsProxyWidget;
+ buttonProxy->setWidget(button);
+ QGraphicsProxyWidget *editProxy = new QGraphicsProxyWidget;
+ editProxy->setWidget(edit);
+
+ QGroupBox *box = new QGroupBox;
+ box->setFlat(true);
+ box->setTitle("Options");
+
+ QVBoxLayout *layout2 = new QVBoxLayout;
+ box->setLayout(layout2);
+ layout2->addWidget(new QRadioButton("Herring"));
+ layout2->addWidget(new QRadioButton("Blue Parrot"));
+ layout2->addWidget(new QRadioButton("Petunias"));
+ layout2->addStretch();
+
+ QGraphicsProxyWidget *boxProxy = new QGraphicsProxyWidget;
+ boxProxy->setWidget(box);
+
+ // Parent widget
+ QGraphicsWidget *widget = new QGraphicsWidget;
+ QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical, widget);
+ layout->addItem(editProxy);
+ layout->addItem(buttonProxy);
+ widget->setLayout(layout);
+
+ Pixmap *p1 = new Pixmap(QPixmap(":/digikam.png"));
+ Pixmap *p2 = new Pixmap(QPixmap(":/akregator.png"));
+ Pixmap *p3 = new Pixmap(QPixmap(":/accessories-dictionary.png"));
+ Pixmap *p4 = new Pixmap(QPixmap(":/k3b.png"));
+ Pixmap *p5 = new Pixmap(QPixmap(":/help-browser.png"));
+ Pixmap *p6 = new Pixmap(QPixmap(":/kchart.png"));
+
+ QGraphicsScene scene(0, 0, 400, 300);
+ scene.setBackgroundBrush(scene.palette().window());
+ scene.addItem(widget);
+ scene.addItem(boxProxy);
+ scene.addItem(p1);
+ scene.addItem(p2);
+ scene.addItem(p3);
+ scene.addItem(p4);
+ scene.addItem(p5);
+ scene.addItem(p6);
+
+ QStateMachine machine;
+ QState *state1 = new QState(&machine);
+ QState *state2 = new QState(&machine);
+ QState *state3 = new QState(&machine);
+ machine.setInitialState(state1);
+
+ // State 1
+ state1->assignProperty(button, "text", "Switch to state 2");
+ state1->assignProperty(widget, "geometry", QRectF(0, 0, 400, 150));
+ state1->assignProperty(box, "geometry", QRect(-200, 150, 200, 150));
+ state1->assignProperty(p1, "pos", QPointF(68, 200)); // 185));
+ state1->assignProperty(p2, "pos", QPointF(168, 200)); // 185));
+ state1->assignProperty(p3, "pos", QPointF(268, 200)); // 185));
+ state1->assignProperty(p4, "pos", QPointF(68 - 150, 48 - 150));
+ state1->assignProperty(p5, "pos", QPointF(168, 48 - 150));
+ state1->assignProperty(p6, "pos", QPointF(268 + 150, 48 - 150));
+ state1->assignProperty(p1, "rotation", qreal(0));
+ state1->assignProperty(p2, "rotation", qreal(0));
+ state1->assignProperty(p3, "rotation", qreal(0));
+ state1->assignProperty(p4, "rotation", qreal(-270));
+ state1->assignProperty(p5, "rotation", qreal(-90));
+ state1->assignProperty(p6, "rotation", qreal(270));
+ state1->assignProperty(boxProxy, "opacity", qreal(0));
+ state1->assignProperty(p1, "opacity", qreal(1));
+ state1->assignProperty(p2, "opacity", qreal(1));
+ state1->assignProperty(p3, "opacity", qreal(1));
+ state1->assignProperty(p4, "opacity", qreal(0));
+ state1->assignProperty(p5, "opacity", qreal(0));
+ state1->assignProperty(p6, "opacity", qreal(0));
+
+ // State 2
+ state2->assignProperty(button, "text", "Switch to state 3");
+ state2->assignProperty(widget, "geometry", QRectF(200, 150, 200, 150));
+ state2->assignProperty(box, "geometry", QRect(9, 150, 190, 150));
+ state2->assignProperty(p1, "pos", QPointF(68 - 150, 185 + 150));
+ state2->assignProperty(p2, "pos", QPointF(168, 185 + 150));
+ state2->assignProperty(p3, "pos", QPointF(268 + 150, 185 + 150));
+ state2->assignProperty(p4, "pos", QPointF(64, 48));
+ state2->assignProperty(p5, "pos", QPointF(168, 48));
+ state2->assignProperty(p6, "pos", QPointF(268, 48));
+ state2->assignProperty(p1, "rotation", qreal(-270));
+ state2->assignProperty(p2, "rotation", qreal(90));
+ state2->assignProperty(p3, "rotation", qreal(270));
+ state2->assignProperty(p4, "rotation", qreal(0));
+ state2->assignProperty(p5, "rotation", qreal(0));
+ state2->assignProperty(p6, "rotation", qreal(0));
+ state2->assignProperty(boxProxy, "opacity", qreal(1));
+ state2->assignProperty(p1, "opacity", qreal(0));
+ state2->assignProperty(p2, "opacity", qreal(0));
+ state2->assignProperty(p3, "opacity", qreal(0));
+ state2->assignProperty(p4, "opacity", qreal(1));
+ state2->assignProperty(p5, "opacity", qreal(1));
+ state2->assignProperty(p6, "opacity", qreal(1));
+
+ // State 3
+ state3->assignProperty(button, "text", "Switch to state 1");
+ state3->assignProperty(p1, "pos", QPointF(0, 5));
+ state3->assignProperty(p2, "pos", QPointF(0, 5 + 64 + 5));
+ state3->assignProperty(p3, "pos", QPointF(5, 5 + (64 + 5) + 64));
+ state3->assignProperty(p4, "pos", QPointF(5 + 64 + 5, 5));
+ state3->assignProperty(p5, "pos", QPointF(5 + 64 + 5, 5 + 64 + 5));
+ state3->assignProperty(p6, "pos", QPointF(5 + 64 + 5, 5 + (64 + 5) + 64));
+ state3->assignProperty(widget, "geometry", QRectF(138, 5, 400 - 138, 200));
+ state3->assignProperty(box, "geometry", QRect(5, 205, 400, 90));
+ state3->assignProperty(p1, "opacity", qreal(1));
+ state3->assignProperty(p2, "opacity", qreal(1));
+ state3->assignProperty(p3, "opacity", qreal(1));
+ state3->assignProperty(p4, "opacity", qreal(1));
+ state3->assignProperty(p5, "opacity", qreal(1));
+ state3->assignProperty(p6, "opacity", qreal(1));
+
+ QAbstractTransition *t1 = state1->addTransition(button, SIGNAL(clicked()), state2);
+ QSequentialAnimationGroup *animation1SubGroup = new QSequentialAnimationGroup;
+ animation1SubGroup->addPause(250);
+ animation1SubGroup->addAnimation(new QPropertyAnimation(box, "geometry"));
+ t1->addAnimation(animation1SubGroup);
+ t1->addAnimation(new QPropertyAnimation(widget, "geometry"));
+ t1->addAnimation(new QPropertyAnimation(p1, "pos"));
+ t1->addAnimation(new QPropertyAnimation(p2, "pos"));
+ t1->addAnimation(new QPropertyAnimation(p3, "pos"));
+ t1->addAnimation(new QPropertyAnimation(p4, "pos"));
+ t1->addAnimation(new QPropertyAnimation(p5, "pos"));
+ t1->addAnimation(new QPropertyAnimation(p6, "pos"));
+ t1->addAnimation(new QPropertyAnimation(p1, "rotation"));
+ t1->addAnimation(new QPropertyAnimation(p2, "rotation"));
+ t1->addAnimation(new QPropertyAnimation(p3, "rotation"));
+ t1->addAnimation(new QPropertyAnimation(p4, "rotation"));
+ t1->addAnimation(new QPropertyAnimation(p5, "rotation"));
+ t1->addAnimation(new QPropertyAnimation(p6, "rotation"));
+ t1->addAnimation(new QPropertyAnimation(p1, "opacity"));
+ t1->addAnimation(new QPropertyAnimation(p2, "opacity"));
+ t1->addAnimation(new QPropertyAnimation(p3, "opacity"));
+ t1->addAnimation(new QPropertyAnimation(p4, "opacity"));
+ t1->addAnimation(new QPropertyAnimation(p5, "opacity"));
+ t1->addAnimation(new QPropertyAnimation(p6, "opacity"));
+
+ QAbstractTransition *t2 = state2->addTransition(button, SIGNAL(clicked()), state3);
+ t2->addAnimation(new QPropertyAnimation(box, "geometry"));
+ t2->addAnimation(new QPropertyAnimation(widget, "geometry"));
+ t2->addAnimation(new QPropertyAnimation(p1, "pos"));
+ t2->addAnimation(new QPropertyAnimation(p2, "pos"));
+ t2->addAnimation(new QPropertyAnimation(p3, "pos"));
+ t2->addAnimation(new QPropertyAnimation(p4, "pos"));
+ t2->addAnimation(new QPropertyAnimation(p5, "pos"));
+ t2->addAnimation(new QPropertyAnimation(p6, "pos"));
+ t2->addAnimation(new QPropertyAnimation(p1, "rotation"));
+ t2->addAnimation(new QPropertyAnimation(p2, "rotation"));
+ t2->addAnimation(new QPropertyAnimation(p3, "rotation"));
+ t2->addAnimation(new QPropertyAnimation(p4, "rotation"));
+ t2->addAnimation(new QPropertyAnimation(p5, "rotation"));
+ t2->addAnimation(new QPropertyAnimation(p6, "rotation"));
+ t2->addAnimation(new QPropertyAnimation(p1, "opacity"));
+ t2->addAnimation(new QPropertyAnimation(p2, "opacity"));
+ t2->addAnimation(new QPropertyAnimation(p3, "opacity"));
+ t2->addAnimation(new QPropertyAnimation(p4, "opacity"));
+ t2->addAnimation(new QPropertyAnimation(p5, "opacity"));
+ t2->addAnimation(new QPropertyAnimation(p6, "opacity"));
+
+ QAbstractTransition *t3 = state3->addTransition(button, SIGNAL(clicked()), state1);
+ t3->addAnimation(new QPropertyAnimation(box, "geometry"));
+ t3->addAnimation(new QPropertyAnimation(widget, "geometry"));
+ t3->addAnimation(new QPropertyAnimation(p1, "pos"));
+ t3->addAnimation(new QPropertyAnimation(p2, "pos"));
+ t3->addAnimation(new QPropertyAnimation(p3, "pos"));
+ t3->addAnimation(new QPropertyAnimation(p4, "pos"));
+ t3->addAnimation(new QPropertyAnimation(p5, "pos"));
+ t3->addAnimation(new QPropertyAnimation(p6, "pos"));
+ t3->addAnimation(new QPropertyAnimation(p1, "rotation"));
+ t3->addAnimation(new QPropertyAnimation(p2, "rotation"));
+ t3->addAnimation(new QPropertyAnimation(p3, "rotation"));
+ t3->addAnimation(new QPropertyAnimation(p4, "rotation"));
+ t3->addAnimation(new QPropertyAnimation(p5, "rotation"));
+ t3->addAnimation(new QPropertyAnimation(p6, "rotation"));
+ t3->addAnimation(new QPropertyAnimation(p1, "opacity"));
+ t3->addAnimation(new QPropertyAnimation(p2, "opacity"));
+ t3->addAnimation(new QPropertyAnimation(p3, "opacity"));
+ t3->addAnimation(new QPropertyAnimation(p4, "opacity"));
+ t3->addAnimation(new QPropertyAnimation(p5, "opacity"));
+ t3->addAnimation(new QPropertyAnimation(p6, "opacity"));
+
+ machine.start();
+
+ GraphicsView view(&scene);
+
+ view.show();
+
+ return app.exec();
+}
+
+#include "main.moc"
diff --git a/examples/widgets/animation/states/states.desktop b/examples/widgets/animation/states/states.desktop
new file mode 100644
index 0000000000..8429979f23
--- /dev/null
+++ b/examples/widgets/animation/states/states.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=States
+Exec=/opt/usr/bin/states
+Icon=states
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/animation/states/states.pro b/examples/widgets/animation/states/states.pro
new file mode 100644
index 0000000000..adf0e8d58c
--- /dev/null
+++ b/examples/widgets/animation/states/states.pro
@@ -0,0 +1,10 @@
+SOURCES += main.cpp
+RESOURCES += states.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/states
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS states.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/states
+INSTALLS += target sources
+
+QT += widgets
diff --git a/examples/widgets/animation/states/states.qrc b/examples/widgets/animation/states/states.qrc
new file mode 100644
index 0000000000..60ab3f7a60
--- /dev/null
+++ b/examples/widgets/animation/states/states.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>accessories-dictionary.png</file>
+ <file>akregator.png</file>
+ <file>digikam.png</file>
+ <file>help-browser.png</file>
+ <file>k3b.png</file>
+ <file>kchart.png</file>
+</qresource>
+</RCC>
diff --git a/examples/widgets/animation/stickman/animation.cpp b/examples/widgets/animation/stickman/animation.cpp
new file mode 100644
index 0000000000..afdfae6eca
--- /dev/null
+++ b/examples/widgets/animation/stickman/animation.cpp
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "animation.h"
+
+#include <QPointF>
+#include <QVector>
+#include <QIODevice>
+#include <QDataStream>
+
+class Frame
+{
+public:
+ Frame() {
+ }
+
+ int nodeCount() const
+ {
+ return m_nodePositions.size();
+ }
+
+ void setNodeCount(int nodeCount)
+ {
+ m_nodePositions.resize(nodeCount);
+ }
+
+ QPointF nodePos(int idx) const
+ {
+ return m_nodePositions.at(idx);
+ }
+
+ void setNodePos(int idx, const QPointF &pos)
+ {
+ m_nodePositions[idx] = pos;
+ }
+
+private:
+ QVector<QPointF> m_nodePositions;
+};
+
+Animation::Animation()
+{
+ m_currentFrame = 0;
+ m_frames.append(new Frame);
+}
+
+Animation::~Animation()
+{
+ qDeleteAll(m_frames);
+}
+
+void Animation::setTotalFrames(int totalFrames)
+{
+ while (m_frames.size() < totalFrames)
+ m_frames.append(new Frame);
+
+ while (totalFrames < m_frames.size())
+ delete m_frames.takeLast();
+}
+
+int Animation::totalFrames() const
+{
+ return m_frames.size();
+}
+
+void Animation::setCurrentFrame(int currentFrame)
+{
+ m_currentFrame = qMax(qMin(currentFrame, totalFrames()-1), 0);
+}
+
+int Animation::currentFrame() const
+{
+ return m_currentFrame;
+}
+
+void Animation::setNodeCount(int nodeCount)
+{
+ Frame *frame = m_frames.at(m_currentFrame);
+ frame->setNodeCount(nodeCount);
+}
+
+int Animation::nodeCount() const
+{
+ Frame *frame = m_frames.at(m_currentFrame);
+ return frame->nodeCount();
+}
+
+void Animation::setNodePos(int idx, const QPointF &pos)
+{
+ Frame *frame = m_frames.at(m_currentFrame);
+ frame->setNodePos(idx, pos);
+}
+
+QPointF Animation::nodePos(int idx) const
+{
+ Frame *frame = m_frames.at(m_currentFrame);
+ return frame->nodePos(idx);
+}
+
+QString Animation::name() const
+{
+ return m_name;
+}
+
+void Animation::setName(const QString &name)
+{
+ m_name = name;
+}
+
+void Animation::save(QIODevice *device) const
+{
+ QDataStream stream(device);
+ stream << m_name;
+ stream << m_frames.size();
+ foreach (Frame *frame, m_frames) {
+ stream << frame->nodeCount();
+ for (int i=0; i<frame->nodeCount(); ++i)
+ stream << frame->nodePos(i);
+ }
+}
+
+void Animation::load(QIODevice *device)
+{
+ if (!m_frames.isEmpty())
+ qDeleteAll(m_frames);
+
+ m_frames.clear();
+
+ QDataStream stream(device);
+ stream >> m_name;
+
+ int frameCount;
+ stream >> frameCount;
+
+ for (int i=0; i<frameCount; ++i) {
+
+ int nodeCount;
+ stream >> nodeCount;
+
+ Frame *frame = new Frame;
+ frame->setNodeCount(nodeCount);
+
+ for (int j=0; j<nodeCount; ++j) {
+ QPointF pos;
+ stream >> pos;
+
+ frame->setNodePos(j, pos);
+ }
+
+ m_frames.append(frame);
+ }
+}
diff --git a/examples/widgets/animation/stickman/animation.h b/examples/widgets/animation/stickman/animation.h
new file mode 100644
index 0000000000..d5dab530e6
--- /dev/null
+++ b/examples/widgets/animation/stickman/animation.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ANIMATION_H
+#define ANIMATION_H
+
+#include <QPointF>
+#include <QList>
+#include <QString>
+
+class Frame;
+QT_BEGIN_NAMESPACE
+class QIODevice;
+QT_END_NAMESPACE
+class Animation
+{
+public:
+ Animation();
+ ~Animation();
+
+ void setTotalFrames(int totalFrames);
+ int totalFrames() const;
+
+ void setCurrentFrame(int currentFrame);
+ int currentFrame() const;
+
+ void setNodeCount(int nodeCount);
+ int nodeCount() const;
+
+ void setNodePos(int idx, const QPointF &pos);
+ QPointF nodePos(int idx) const;
+
+ QString name() const;
+ void setName(const QString &name);
+
+ void save(QIODevice *device) const;
+ void load(QIODevice *device);
+
+private:
+ QString m_name;
+ QList<Frame *> m_frames;
+ int m_currentFrame;
+};
+
+#endif
diff --git a/examples/widgets/animation/stickman/animations/chilling.bin b/examples/widgets/animation/stickman/animations/chilling.bin
new file mode 100644
index 0000000000..a81fc7a18c
--- /dev/null
+++ b/examples/widgets/animation/stickman/animations/chilling.bin
Binary files differ
diff --git a/examples/widgets/animation/stickman/animations/dancing.bin b/examples/widgets/animation/stickman/animations/dancing.bin
new file mode 100644
index 0000000000..462f66f89b
--- /dev/null
+++ b/examples/widgets/animation/stickman/animations/dancing.bin
Binary files differ
diff --git a/examples/widgets/animation/stickman/animations/dead.bin b/examples/widgets/animation/stickman/animations/dead.bin
new file mode 100644
index 0000000000..9859b4b4cd
--- /dev/null
+++ b/examples/widgets/animation/stickman/animations/dead.bin
Binary files differ
diff --git a/examples/widgets/animation/stickman/animations/jumping.bin b/examples/widgets/animation/stickman/animations/jumping.bin
new file mode 100644
index 0000000000..12661a15f8
--- /dev/null
+++ b/examples/widgets/animation/stickman/animations/jumping.bin
Binary files differ
diff --git a/examples/widgets/animation/stickman/graphicsview.cpp b/examples/widgets/animation/stickman/graphicsview.cpp
new file mode 100644
index 0000000000..134fb8acf1
--- /dev/null
+++ b/examples/widgets/animation/stickman/graphicsview.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "graphicsview.h"
+#include "stickman.h"
+
+#include <QtGui/QKeyEvent>
+#include <QtWidgets/QGraphicsScene>
+#include <QtWidgets/QGraphicsView>
+
+GraphicsView::GraphicsView(QWidget *parent) : QGraphicsView(parent), m_editor(0) {}
+
+void GraphicsView::keyPressEvent(QKeyEvent *e)
+{
+ if (e->key() == Qt::Key_Escape)
+ close();
+ emit keyPressed(Qt::Key(e->key()));
+}
+
+void GraphicsView::resizeEvent(QResizeEvent *)
+{
+ fitInView(scene()->sceneRect());
+}
diff --git a/examples/widgets/animation/stickman/graphicsview.h b/examples/widgets/animation/stickman/graphicsview.h
new file mode 100644
index 0000000000..38bf6e1eb6
--- /dev/null
+++ b/examples/widgets/animation/stickman/graphicsview.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef GRAPHICSVIEW_H
+#define GRAPHICSVIEW
+
+#include <QtWidgets/QGraphicsView>
+
+class MainWindow;
+class GraphicsView: public QGraphicsView
+{
+ Q_OBJECT
+public:
+ GraphicsView(QWidget *parent = 0);
+
+protected:
+ virtual void resizeEvent(QResizeEvent *event);
+ void keyPressEvent(QKeyEvent *);
+
+signals:
+ void keyPressed(int key);
+
+private:
+ MainWindow *m_editor;
+};
+
+#endif
diff --git a/examples/widgets/animation/stickman/lifecycle.cpp b/examples/widgets/animation/stickman/lifecycle.cpp
new file mode 100644
index 0000000000..53249ccd6f
--- /dev/null
+++ b/examples/widgets/animation/stickman/lifecycle.cpp
@@ -0,0 +1,217 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "lifecycle.h"
+#include "stickman.h"
+#include "node.h"
+#include "animation.h"
+#include "graphicsview.h"
+
+#include <QtCore>
+#include <QtWidgets>
+
+class KeyPressTransition: public QSignalTransition
+{
+public:
+ KeyPressTransition(GraphicsView *receiver, Qt::Key key)
+ : QSignalTransition(receiver, SIGNAL(keyPressed(int))), m_key(key)
+ {
+ }
+ KeyPressTransition(GraphicsView *receiver, Qt::Key key, QAbstractState *target)
+ : QSignalTransition(receiver, SIGNAL(keyPressed(int))), m_key(key)
+ {
+ setTargetState(target);
+ }
+
+ virtual bool eventTest(QEvent *e)
+ {
+ if (QSignalTransition::eventTest(e)) {
+ QVariant key = static_cast<QStateMachine::SignalEvent*>(e)->arguments().at(0);
+ return (key.toInt() == int(m_key));
+ }
+
+ return false;
+ }
+private:
+ Qt::Key m_key;
+};
+
+//! [4]
+class LightningStrikesTransition: public QEventTransition
+{
+public:
+ LightningStrikesTransition(QAbstractState *target)
+ : QEventTransition(this, QEvent::Timer)
+ {
+ setTargetState(target);
+ qsrand((uint)QDateTime::currentDateTime().toTime_t());
+ startTimer(1000);
+ }
+
+ virtual bool eventTest(QEvent *e)
+ {
+ return QEventTransition::eventTest(e) && ((qrand() % 50) == 0);
+ }
+};
+//! [4]
+
+LifeCycle::LifeCycle(StickMan *stickMan, GraphicsView *keyReceiver)
+ : m_stickMan(stickMan), m_keyReceiver(keyReceiver)
+{
+ // Create animation group to be used for all transitions
+ m_animationGroup = new QParallelAnimationGroup();
+ const int stickManNodeCount = m_stickMan->nodeCount();
+ for (int i=0; i<stickManNodeCount; ++i) {
+ QPropertyAnimation *pa = new QPropertyAnimation(m_stickMan->node(i), "pos");
+ m_animationGroup->addAnimation(pa);
+ }
+
+ // Set up initial state graph
+//! [3]
+ m_machine = new QStateMachine();
+ m_machine->addDefaultAnimation(m_animationGroup);
+//! [3]
+
+ m_alive = new QState(m_machine);
+ m_alive->setObjectName("alive");
+
+ // Make it blink when lightning strikes before entering dead animation
+ QState *lightningBlink = new QState(m_machine);
+ lightningBlink->assignProperty(m_stickMan->scene(), "backgroundBrush", Qt::white);
+ lightningBlink->assignProperty(m_stickMan, "penColor", Qt::black);
+ lightningBlink->assignProperty(m_stickMan, "fillColor", Qt::white);
+ lightningBlink->assignProperty(m_stickMan, "isDead", true);
+
+//! [5]
+ QTimer *timer = new QTimer(lightningBlink);
+ timer->setSingleShot(true);
+ timer->setInterval(100);
+ QObject::connect(lightningBlink, SIGNAL(entered()), timer, SLOT(start()));
+ QObject::connect(lightningBlink, SIGNAL(exited()), timer, SLOT(stop()));
+//! [5]
+
+ m_dead = new QState(m_machine);
+ m_dead->assignProperty(m_stickMan->scene(), "backgroundBrush", Qt::black);
+ m_dead->assignProperty(m_stickMan, "penColor", Qt::white);
+ m_dead->assignProperty(m_stickMan, "fillColor", Qt::black);
+ m_dead->setObjectName("dead");
+
+ // Idle state (sets no properties)
+ m_idle = new QState(m_alive);
+ m_idle->setObjectName("idle");
+
+ m_alive->setInitialState(m_idle);
+
+ // Lightning strikes at random
+ m_alive->addTransition(new LightningStrikesTransition(lightningBlink));
+//! [0]
+ lightningBlink->addTransition(timer, SIGNAL(timeout()), m_dead);
+//! [0]
+
+ m_machine->setInitialState(m_alive);
+}
+
+void LifeCycle::setDeathAnimation(const QString &fileName)
+{
+ QState *deathAnimation = makeState(m_dead, fileName);
+ m_dead->setInitialState(deathAnimation);
+}
+
+void LifeCycle::start()
+{
+ m_machine->start();
+}
+
+void LifeCycle::addActivity(const QString &fileName, Qt::Key key, QObject *sender, const char *signal)
+{
+ QState *state = makeState(m_alive, fileName);
+ m_alive->addTransition(new KeyPressTransition(m_keyReceiver, key, state));
+
+ if((sender != NULL) || (signal != NULL)) {
+ m_alive->addTransition(sender, signal, state);
+ }
+}
+
+QState *LifeCycle::makeState(QState *parentState, const QString &animationFileName)
+{
+ QState *topLevel = new QState(parentState);
+
+ Animation animation;
+ {
+ QFile file(animationFileName);
+ if (file.open(QIODevice::ReadOnly))
+ animation.load(&file);
+ }
+
+ const int frameCount = animation.totalFrames();
+ QState *previousState = 0;
+ for (int i=0; i<frameCount; ++i) {
+ animation.setCurrentFrame(i);
+
+//! [1]
+ QState *frameState = new QState(topLevel);
+ const int nodeCount = animation.nodeCount();
+ for (int j=0; j<nodeCount; ++j)
+ frameState->assignProperty(m_stickMan->node(j), "pos", animation.nodePos(j));
+//! [1]
+
+ frameState->setObjectName(QString::fromLatin1("frame %0").arg(i));
+ if (previousState == 0)
+ topLevel->setInitialState(frameState);
+ else
+//! [2]
+ previousState->addTransition(previousState, SIGNAL(propertiesAssigned()), frameState);
+//! [2]
+
+ previousState = frameState;
+ }
+
+ // Loop
+ previousState->addTransition(previousState, SIGNAL(propertiesAssigned()), topLevel->initialState());
+
+ return topLevel;
+
+}
+
+LifeCycle::~LifeCycle()
+{
+ delete m_machine;
+ delete m_animationGroup;
+}
diff --git a/examples/widgets/animation/stickman/lifecycle.h b/examples/widgets/animation/stickman/lifecycle.h
new file mode 100644
index 0000000000..8e8bb50659
--- /dev/null
+++ b/examples/widgets/animation/stickman/lifecycle.h
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef LIFECYCLE_H
+#define LIFECYCLE_H
+
+#include <Qt>
+
+class StickMan;
+QT_BEGIN_NAMESPACE
+class QStateMachine;
+class QAnimationGroup;
+class QState;
+class QAbstractState;
+class QAbstractTransition;
+class QObject;
+QT_END_NAMESPACE
+class GraphicsView;
+class LifeCycle
+{
+public:
+ LifeCycle(StickMan *stickMan, GraphicsView *keyEventReceiver);
+ ~LifeCycle();
+
+ void setDeathAnimation(const QString &fileName);
+ void addActivity(const QString &fileName, Qt::Key key, QObject *sender = NULL, const char *signal = NULL);
+
+ void start();
+
+private:
+ QState *makeState(QState *parentState, const QString &animationFileName);
+
+ StickMan *m_stickMan;
+ QStateMachine *m_machine;
+ QAnimationGroup *m_animationGroup;
+ GraphicsView *m_keyReceiver;
+
+ QState *m_alive;
+ QState *m_dead;
+ QState *m_idle;
+};
+
+#endif
diff --git a/examples/widgets/animation/stickman/main.cpp b/examples/widgets/animation/stickman/main.cpp
new file mode 100644
index 0000000000..3e49da8de3
--- /dev/null
+++ b/examples/widgets/animation/stickman/main.cpp
@@ -0,0 +1,106 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "animation.h"
+#include "node.h"
+#include "lifecycle.h"
+#include "stickman.h"
+#include "graphicsview.h"
+#include "rectbutton.h"
+
+#include <QtCore>
+#include <QtWidgets>
+
+int main(int argc, char **argv)
+{
+ Q_INIT_RESOURCE(stickman);
+ QApplication app(argc, argv);
+
+ StickMan *stickMan = new StickMan;
+ stickMan->setDrawSticks(false);
+
+ QGraphicsTextItem *textItem = new QGraphicsTextItem();
+ textItem->setHtml("<font color=\"white\"><b>Stickman</b>"
+ "<p>"
+ "Tell the stickman what to do!"
+ "</p>"
+ "<p><i>"
+ "<li>Press <font color=\"purple\">J</font> to make the stickman jump.</li>"
+ "<li>Press <font color=\"purple\">D</font> to make the stickman dance.</li>"
+ "<li>Press <font color=\"purple\">C</font> to make him chill out.</li>"
+ "<li>When you are done, press <font color=\"purple\">Escape</font>.</li>"
+ "</i></p>"
+ "<p>If he is unlucky, the stickman will get struck by lightning, and never jump, dance or chill out again."
+ "</p></font>");
+ qreal w = textItem->boundingRect().width();
+ QRectF stickManBoundingRect = stickMan->mapToScene(stickMan->boundingRect()).boundingRect();
+ textItem->setPos(-w / 2.0, stickManBoundingRect.bottom() + 25.0);
+
+ QGraphicsScene scene;
+ scene.addItem(stickMan);
+
+ scene.addItem(textItem);
+ scene.setBackgroundBrush(Qt::black);
+
+ GraphicsView view;
+ view.setRenderHints(QPainter::Antialiasing);
+ view.setTransformationAnchor(QGraphicsView::NoAnchor);
+ view.setScene(&scene);
+
+ QRectF sceneRect = scene.sceneRect();
+ // making enough room in the scene for stickman to jump and die
+ view.resize(sceneRect.width() + 100, sceneRect.height() + 100);
+ view.setSceneRect(sceneRect);
+
+ view.show();
+ view.setFocus();
+
+ LifeCycle cycle(stickMan, &view);
+ cycle.setDeathAnimation(":/animations/dead.bin");
+
+ cycle.addActivity(":/animations/jumping.bin", Qt::Key_J);
+ cycle.addActivity(":/animations/dancing.bin", Qt::Key_D);
+ cycle.addActivity(":/animations/chilling.bin", Qt::Key_C);
+
+ cycle.start();
+
+
+ return app.exec();
+}
diff --git a/examples/widgets/animation/stickman/node.cpp b/examples/widgets/animation/stickman/node.cpp
new file mode 100644
index 0000000000..2de34b379c
--- /dev/null
+++ b/examples/widgets/animation/stickman/node.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "node.h"
+#include "stickman.h"
+
+#include <QRectF>
+#include <QPainter>
+#include <QGraphicsSceneMouseEvent>
+
+Node::Node(const QPointF &pos, QGraphicsItem *parent)
+ : QGraphicsObject(parent), m_dragging(false)
+{
+ setPos(pos);
+ setFlag(QGraphicsItem::ItemSendsGeometryChanges);
+}
+
+Node::~Node()
+{
+}
+
+QRectF Node::boundingRect() const
+{
+ return QRectF(-6.0, -6.0, 12.0, 12.0);
+}
+
+void Node::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ painter->setPen(Qt::white);
+ painter->drawEllipse(QPointF(0.0, 0.0), 5.0, 5.0);
+}
+
+QVariant Node::itemChange(GraphicsItemChange change, const QVariant &value)
+{
+ if (change == QGraphicsItem::ItemPositionChange)
+ emit positionChanged();
+
+ return QGraphicsObject::itemChange(change, value);
+}
+
+void Node::mousePressEvent(QGraphicsSceneMouseEvent *)
+{
+ m_dragging = true;
+}
+
+void Node::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
+{
+ if (m_dragging)
+ setPos(mapToParent(event->pos()));
+}
+
+void Node::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
+{
+ m_dragging = false;
+}
diff --git a/examples/widgets/animation/stickman/node.h b/examples/widgets/animation/stickman/node.h
new file mode 100644
index 0000000000..ae6e2a3ed0
--- /dev/null
+++ b/examples/widgets/animation/stickman/node.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef NODE_H
+#define NODE_H
+
+#include <QGraphicsItem>
+
+class Node: public QGraphicsObject
+{
+ Q_OBJECT
+public:
+ Node(const QPointF &pos, QGraphicsItem *parent = 0);
+ ~Node();
+
+ QRectF boundingRect() const;
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+
+signals:
+ void positionChanged();
+
+protected:
+ QVariant itemChange(GraphicsItemChange change, const QVariant &value);
+
+ void mousePressEvent(QGraphicsSceneMouseEvent *);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
+
+private:
+ bool m_dragging;
+};
+
+#endif
diff --git a/examples/widgets/animation/stickman/rectbutton.cpp b/examples/widgets/animation/stickman/rectbutton.cpp
new file mode 100644
index 0000000000..8b17600ef5
--- /dev/null
+++ b/examples/widgets/animation/stickman/rectbutton.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "rectbutton.h"
+#include <QPainter>
+
+RectButton::RectButton(QString buttonText) : m_ButtonText(buttonText)
+{
+}
+
+
+RectButton::~RectButton()
+{
+}
+
+
+void RectButton::mousePressEvent (QGraphicsSceneMouseEvent *)
+{
+ emit clicked();
+}
+
+
+QRectF RectButton::boundingRect() const
+{
+ return QRectF(0.0, 0.0, 90.0, 40.0);
+}
+
+
+void RectButton::paint(QPainter *painter, const QStyleOptionGraphicsItem * /* option */, QWidget * /* widget */)
+{
+ painter->setBrush(Qt::gray);
+ painter->drawRoundedRect(boundingRect(), 5, 5);
+
+ painter->setPen(Qt::white);
+ painter->drawText(20, 25, m_ButtonText);
+}
diff --git a/examples/widgets/animation/stickman/rectbutton.h b/examples/widgets/animation/stickman/rectbutton.h
new file mode 100644
index 0000000000..ead8f21420
--- /dev/null
+++ b/examples/widgets/animation/stickman/rectbutton.h
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef RECTBUTTON_H
+#define RECTBUTTON_H
+
+#include <QGraphicsObject>
+
+class RectButton : public QGraphicsObject
+{
+ Q_OBJECT
+public:
+ RectButton(QString buttonText);
+ ~RectButton();
+
+ virtual QRectF boundingRect() const;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+
+protected:
+ QString m_ButtonText;
+
+ virtual void mousePressEvent (QGraphicsSceneMouseEvent *event);
+
+signals:
+ void clicked();
+};
+
+#endif // RECTBUTTON_H
diff --git a/examples/widgets/animation/stickman/stickman.cpp b/examples/widgets/animation/stickman/stickman.cpp
new file mode 100644
index 0000000000..667ed7d141
--- /dev/null
+++ b/examples/widgets/animation/stickman/stickman.cpp
@@ -0,0 +1,337 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "stickman.h"
+#include "node.h"
+
+#include <QPainter>
+#include <QTimer>
+
+#define _USE_MATH_DEFINES
+#include <math.h>
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+static const qreal Coords[NodeCount * 2] = {
+ 0.0, -150.0, // head, #0
+
+ 0.0, -100.0, // body pentagon, top->bottom, left->right, #1 - 5
+ -50.0, -50.0,
+ 50.0, -50.0,
+ -25.0, 50.0,
+ 25.0, 50.0,
+
+ -100.0, 0.0, // right arm, #6 - 7
+ -125.0, 50.0,
+
+ 100.0, 0.0, // left arm, #8 - 9
+ 125.0, 50.0,
+
+ -35.0, 75.0, // lower body, #10 - 11
+ 35.0, 75.0,
+
+ -25.0, 200.0, // right leg, #12 - 13
+ -30.0, 300.0,
+
+ 25.0, 200.0, // left leg, #14 - 15
+ 30.0, 300.0
+
+};
+
+static const int Bones[BoneCount * 2] = {
+ 0, 1, // neck
+
+ 1, 2, // body
+ 1, 3,
+ 1, 4,
+ 1, 5,
+ 2, 3,
+ 2, 4,
+ 2, 5,
+ 3, 4,
+ 3, 5,
+ 4, 5,
+
+ 2, 6, // right arm
+ 6, 7,
+
+ 3, 8, // left arm
+ 8, 9,
+
+ 4, 10, // lower body
+ 4, 11,
+ 5, 10,
+ 5, 11,
+ 10, 11,
+
+ 10, 12, // right leg
+ 12, 13,
+
+ 11, 14, // left leg
+ 14, 15
+
+};
+
+StickMan::StickMan()
+{
+ m_sticks = true;
+ m_isDead = false;
+ m_pixmap = QPixmap("images/head.png");
+ m_penColor = Qt::white;
+ m_fillColor = Qt::black;
+
+ // Set up start position of limbs
+ for (int i=0; i<NodeCount; ++i) {
+ m_nodes[i] = new Node(QPointF(Coords[i * 2], Coords[i * 2 + 1]), this);
+ connect(m_nodes[i], SIGNAL(positionChanged()), this, SLOT(childPositionChanged()));
+ }
+
+ for (int i=0; i<BoneCount; ++i) {
+ int n1 = Bones[i * 2];
+ int n2 = Bones[i * 2 + 1];
+
+ Node *node1 = m_nodes[n1];
+ Node *node2 = m_nodes[n2];
+
+ QPointF dist = node1->pos() - node2->pos();
+ m_perfectBoneLengths[i] = sqrt(pow(dist.x(),2) + pow(dist.y(),2));
+ }
+
+ startTimer(10);
+}
+
+StickMan::~StickMan()
+{
+}
+
+void StickMan::childPositionChanged()
+{
+ prepareGeometryChange();
+}
+
+void StickMan::setDrawSticks(bool on)
+{
+ m_sticks = on;
+ for (int i=0;i<nodeCount();++i) {
+ Node *node = m_nodes[i];
+ node->setVisible(on);
+ }
+}
+
+QRectF StickMan::boundingRect() const
+{
+ // account for head radius=50.0 plus pen which is 5.0
+ return childrenBoundingRect().adjusted(-55.0, -55.0, 55.0, 55.0);
+}
+
+int StickMan::nodeCount() const
+{
+ return NodeCount;
+}
+
+Node *StickMan::node(int idx) const
+{
+ if (idx >= 0 && idx < NodeCount)
+ return m_nodes[idx];
+ else
+ return 0;
+}
+
+void StickMan::timerEvent(QTimerEvent *)
+{
+ update();
+}
+
+void StickMan::stabilize()
+{
+ static const qreal threshold = 0.001;
+
+ for (int i=0; i<BoneCount; ++i) {
+ int n1 = Bones[i * 2];
+ int n2 = Bones[i * 2 + 1];
+
+ Node *node1 = m_nodes[n1];
+ Node *node2 = m_nodes[n2];
+
+ QPointF pos1 = node1->pos();
+ QPointF pos2 = node2->pos();
+
+ QPointF dist = pos1 - pos2;
+ qreal length = sqrt(pow(dist.x(),2) + pow(dist.y(),2));
+ qreal diff = (length - m_perfectBoneLengths[i]) / length;
+
+ QPointF p = dist * (0.5 * diff);
+ if (p.x() > threshold && p.y() > threshold) {
+ pos1 -= p;
+ pos2 += p;
+
+ node1->setPos(pos1);
+ node2->setPos(pos2);
+ }
+ }
+}
+
+QPointF StickMan::posFor(int idx) const
+{
+ return m_nodes[idx]->pos();
+}
+
+//#include <QTime>
+void StickMan::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+{
+ /* static int frames = 0;
+ static QTime time;
+ if (frames++ % 100 == 0) {
+ frames = 1;
+ time.restart();
+ }
+
+ if (time.elapsed() > 0) {
+ painter->setPen(Qt::white);
+ painter->drawText(0, 0, QString::number(frames / (time.elapsed() / 1000.0)));
+ }*/
+
+ stabilize();
+ if (m_sticks) {
+ painter->setPen(Qt::white);
+ for (int i=0; i<BoneCount; ++i) {
+ int n1 = Bones[i * 2];
+ int n2 = Bones[i * 2 + 1];
+
+ Node *node1 = m_nodes[n1];
+ Node *node2 = m_nodes[n2];
+
+ painter->drawLine(node1->pos(), node2->pos());
+ }
+ } else {
+ // first bone is neck and will be used for head
+
+ QPainterPath path;
+ path.moveTo(posFor(0));
+ path.lineTo(posFor(1));
+
+ // right arm
+ path.lineTo(posFor(2));
+ path.lineTo(posFor(6));
+ path.lineTo(posFor(7));
+
+ // left arm
+ path.moveTo(posFor(3));
+ path.lineTo(posFor(8));
+ path.lineTo(posFor(9));
+
+ // body
+ path.moveTo(posFor(2));
+ path.lineTo(posFor(4));
+ path.lineTo(posFor(10));
+ path.lineTo(posFor(11));
+ path.lineTo(posFor(5));
+ path.lineTo(posFor(3));
+ path.lineTo(posFor(1));
+
+ // right leg
+ path.moveTo(posFor(10));
+ path.lineTo(posFor(12));
+ path.lineTo(posFor(13));
+
+ // left leg
+ path.moveTo(posFor(11));
+ path.lineTo(posFor(14));
+ path.lineTo(posFor(15));
+
+ painter->setPen(QPen(m_penColor, 5.0, Qt::SolidLine, Qt::RoundCap));
+ painter->drawPath(path);
+
+ {
+ int n1 = Bones[0];
+ int n2 = Bones[1];
+ Node *node1 = m_nodes[n1];
+ Node *node2 = m_nodes[n2];
+
+ QPointF dist = node2->pos() - node1->pos();
+
+ qreal sinAngle = dist.x() / sqrt(pow(dist.x(), 2) + pow(dist.y(), 2));
+ qreal angle = asin(sinAngle) * 180.0 / M_PI;
+
+ QPointF headPos = node1->pos();
+ painter->translate(headPos);
+ painter->rotate(-angle);
+
+ painter->setBrush(m_fillColor);
+ painter->drawEllipse(QPointF(0,0), 50.0, 50.0);
+
+ painter->setBrush(m_penColor);
+ painter->setPen(QPen(m_penColor, 2.5, Qt::SolidLine, Qt::RoundCap));
+
+ // eyes
+ if (m_isDead) {
+ painter->drawLine(-30.0, -30.0, -20.0, -20.0);
+ painter->drawLine(-20.0, -30.0, -30.0, -20.0);
+
+ painter->drawLine(20.0, -30.0, 30.0, -20.0);
+ painter->drawLine(30.0, -30.0, 20.0, -20.0);
+ } else {
+ painter->drawChord(QRectF(-30.0, -30.0, 25.0, 70.0), 30.0*16, 120.0*16);
+ painter->drawChord(QRectF(5.0, -30.0, 25.0, 70.0), 30.0*16, 120.0*16);
+ }
+
+ // mouth
+ if (m_isDead) {
+ painter->drawLine(-28.0, 2.0, 29.0, 2.0);
+ } else {
+ painter->setBrush(QColor(128, 0, 64 ));
+ painter->drawChord(QRectF(-28.0, 2.0-55.0/2.0, 57.0, 55.0), 0.0, -180.0*16);
+ }
+
+ // pupils
+ if (!m_isDead) {
+ painter->setPen(QPen(m_fillColor, 1.0, Qt::SolidLine, Qt::RoundCap));
+ painter->setBrush(m_fillColor);
+ painter->drawEllipse(QPointF(-12.0, -25.0), 5.0, 5.0);
+ painter->drawEllipse(QPointF(22.0, -25.0), 5.0, 5.0);
+ }
+ }
+ }
+}
+
+
+
diff --git a/examples/widgets/animation/stickman/stickman.desktop b/examples/widgets/animation/stickman/stickman.desktop
new file mode 100644
index 0000000000..1722d4db3e
--- /dev/null
+++ b/examples/widgets/animation/stickman/stickman.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Stickman
+Exec=/opt/usr/bin/stickman
+Icon=stickman
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/widgets/animation/stickman/stickman.h b/examples/widgets/animation/stickman/stickman.h
new file mode 100644
index 0000000000..f50ed1a6c2
--- /dev/null
+++ b/examples/widgets/animation/stickman/stickman.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "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 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."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef STICKMAN_H
+#define STICKMAN_H
+
+#include <QGraphicsObject>
+
+static const int NodeCount = 16;
+static const int BoneCount = 24;
+
+class Node;
+QT_BEGIN_NAMESPACE
+QT_END_NAMESPACE
+class StickMan: public QGraphicsObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QColor penColor WRITE setPenColor READ penColor)
+ Q_PROPERTY(QColor fillColor WRITE setFillColor READ fillColor)
+ Q_PROPERTY(bool isDead WRITE setIsDead READ isDead)
+public:
+ StickMan();
+ ~StickMan();
+
+ virtual QRectF boundingRect() const;
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
+
+ int nodeCount() const;
+ Node *node(int idx) const;
+
+ void setDrawSticks(bool on);
+ bool drawSticks() const { return m_sticks; }
+
+ QColor penColor() const { return m_penColor; }
+ void setPenColor(const QColor &color) { m_penColor = color; }
+
+ QColor fillColor() const { return m_fillColor; }
+ void setFillColor(const QColor &color) { m_fillColor = color; }
+
+ bool isDead() const { return m_isDead; }
+ void setIsDead(bool isDead) { m_isDead = isDead; }
+
+public slots:
+ void stabilize();
+ void childPositionChanged();
+
+protected:
+ void timerEvent(QTimerEvent *e);
+
+private:
+
+ QPointF posFor(int idx) const;
+
+ Node *m_nodes[NodeCount];
+ qreal m_perfectBoneLengths[BoneCount];
+
+ uint m_sticks : 1;
+ uint m_isDead : 1;
+ uint m_reserved : 30;
+
+ QPixmap m_pixmap;
+ QColor m_penColor;
+ QColor m_fillColor;
+};
+
+#endif // STICKMAN_H
diff --git a/examples/widgets/animation/stickman/stickman.pro b/examples/widgets/animation/stickman/stickman.pro
new file mode 100644
index 0000000000..43aaec113d
--- /dev/null
+++ b/examples/widgets/animation/stickman/stickman.pro
@@ -0,0 +1,23 @@
+HEADERS += stickman.h \
+ animation.h \
+ node.h \
+ lifecycle.h \
+ graphicsview.h \
+ rectbutton.h
+SOURCES += main.cpp \
+ stickman.cpp \
+ animation.cpp \
+ node.cpp \
+ lifecycle.cpp \
+ graphicsview.cpp \
+ rectbutton.cpp
+
+RESOURCES += stickman.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/stickman
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS stickman.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/stickman
+INSTALLS += target sources
+
+QT += widgets
diff --git a/examples/widgets/animation/stickman/stickman.qrc b/examples/widgets/animation/stickman/stickman.qrc
new file mode 100644
index 0000000000..4cf3ba3828
--- /dev/null
+++ b/examples/widgets/animation/stickman/stickman.qrc
@@ -0,0 +1,8 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>animations/chilling.bin</file>
+ <file>animations/dancing.bin</file>
+ <file>animations/dead.bin</file>
+ <file>animations/jumping.bin</file>
+</qresource>
+</RCC>
diff --git a/examples/widgets/animation/sub-attaq/animationmanager.cpp b/examples/widgets/animation/sub-attaq/animationmanager.cpp
new file mode 100644
index 0000000000..7dcb9dfb50
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/animationmanager.cpp
@@ -0,0 +1,98 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//Own
+#include "animationmanager.h"
+
+//Qt
+#include <QtCore/QAbstractAnimation>
+#include <QtCore/QDebug>
+
+// the universe's only animation manager
+AnimationManager *AnimationManager::instance = 0;
+
+AnimationManager::AnimationManager()
+{
+}
+
+AnimationManager *AnimationManager::self()
+{
+ if (!instance)
+ instance = new AnimationManager;
+ return instance;
+}
+
+void AnimationManager::registerAnimation(QAbstractAnimation *anim)
+{
+ QObject::connect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*)));
+ animations.append(anim);
+}
+
+void AnimationManager::unregisterAnimation_helper(QObject *obj)
+{
+ unregisterAnimation(static_cast<QAbstractAnimation*>(obj));
+}
+
+void AnimationManager::unregisterAnimation(QAbstractAnimation *anim)
+{
+ QObject::disconnect(anim, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterAnimation_helper(QObject*)));
+ animations.removeAll(anim);
+}
+
+void AnimationManager::unregisterAllAnimations()
+{
+ animations.clear();
+}
+
+void AnimationManager::pauseAll()
+{
+ foreach (QAbstractAnimation* animation, animations) {
+ if (animation->state() == QAbstractAnimation::Running)
+ animation->pause();
+ }
+}
+void AnimationManager::resumeAll()
+{
+ foreach (QAbstractAnimation* animation, animations) {
+ if (animation->state() == QAbstractAnimation::Paused)
+ animation->resume();
+ }
+}
diff --git a/examples/widgets/animation/sub-attaq/animationmanager.h b/examples/widgets/animation/sub-attaq/animationmanager.h
new file mode 100644
index 0000000000..6587e39b14
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/animationmanager.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ANIMATIONMANAGER_H
+#define ANIMATIONMANAGER_H
+
+#include <QtCore/QObject>
+
+QT_BEGIN_NAMESPACE
+class QAbstractAnimation;
+QT_END_NAMESPACE
+
+class AnimationManager : public QObject
+{
+Q_OBJECT
+public:
+ AnimationManager();
+ void registerAnimation(QAbstractAnimation *anim);
+ void unregisterAnimation(QAbstractAnimation *anim);
+ void unregisterAllAnimations();
+ static AnimationManager *self();
+
+public slots:
+ void pauseAll();
+ void resumeAll();
+
+private slots:
+ void unregisterAnimation_helper(QObject *obj);
+
+private:
+ static AnimationManager *instance;
+ QList<QAbstractAnimation *> animations;
+};
+
+#endif // ANIMATIONMANAGER_H
diff --git a/examples/widgets/animation/sub-attaq/boat.cpp b/examples/widgets/animation/sub-attaq/boat.cpp
new file mode 100644
index 0000000000..88332dbfe7
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/boat.cpp
@@ -0,0 +1,272 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//Own
+#include "boat.h"
+#include "boat_p.h"
+#include "bomb.h"
+#include "pixmapitem.h"
+#include "graphicsscene.h"
+#include "animationmanager.h"
+#include "qanimationstate.h"
+
+//Qt
+#include <QtCore/QPropertyAnimation>
+#include <QtCore/QStateMachine>
+#include <QtCore/QHistoryState>
+#include <QtCore/QFinalState>
+#include <QtCore/QState>
+#include <QtCore/QSequentialAnimationGroup>
+
+static QAbstractAnimation *setupDestroyAnimation(Boat *boat)
+{
+ QSequentialAnimationGroup *group = new QSequentialAnimationGroup(boat);
+ for (int i = 1; i <= 4; i++) {
+ PixmapItem *step = new PixmapItem(QString("explosion/boat/step%1").arg(i),GraphicsScene::Big, boat);
+ step->setZValue(6);
+ step->setOpacity(0);
+
+ //fade-in
+ QPropertyAnimation *anim = new QPropertyAnimation(step, "opacity");
+ anim->setEndValue(1);
+ anim->setDuration(100);
+ group->insertAnimation(i-1, anim);
+
+ //and then fade-out
+ QPropertyAnimation *anim2 = new QPropertyAnimation(step, "opacity");
+ anim2->setEndValue(0);
+ anim2->setDuration(100);
+ group->addAnimation(anim2);
+ }
+
+ AnimationManager::self()->registerAnimation(group);
+ return group;
+}
+
+
+
+Boat::Boat() : PixmapItem(QString("boat"), GraphicsScene::Big),
+ speed(0), bombsAlreadyLaunched(0), direction(Boat::None), movementAnimation(0)
+{
+ setZValue(4);
+ setFlags(QGraphicsItem::ItemIsFocusable);
+
+ //The movement animation used to animate the boat
+ movementAnimation = new QPropertyAnimation(this, "pos");
+
+ //The destroy animation used to explode the boat
+ destroyAnimation = setupDestroyAnimation(this);
+
+ //We setup the state machine of the boat
+ machine = new QStateMachine(this);
+ QState *moving = new QState(machine);
+ StopState *stopState = new StopState(this, moving);
+ machine->setInitialState(moving);
+ moving->setInitialState(stopState);
+ MoveStateRight *moveStateRight = new MoveStateRight(this, moving);
+ MoveStateLeft *moveStateLeft = new MoveStateLeft(this, moving);
+ LaunchStateRight *launchStateRight = new LaunchStateRight(this, machine);
+ LaunchStateLeft *launchStateLeft = new LaunchStateLeft(this, machine);
+
+ //then setup the transitions for the rightMove state
+ KeyStopTransition *leftStopRight = new KeyStopTransition(this, QEvent::KeyPress, Qt::Key_Left);
+ leftStopRight->setTargetState(stopState);
+ KeyMoveTransition *leftMoveRight = new KeyMoveTransition(this, QEvent::KeyPress, Qt::Key_Left);
+ leftMoveRight->setTargetState(moveStateRight);
+ KeyMoveTransition *rightMoveRight = new KeyMoveTransition(this, QEvent::KeyPress, Qt::Key_Right);
+ rightMoveRight->setTargetState(moveStateRight);
+ KeyMoveTransition *rightMoveStop = new KeyMoveTransition(this, QEvent::KeyPress, Qt::Key_Right);
+ rightMoveStop->setTargetState(moveStateRight);
+
+ //then setup the transitions for the leftMove state
+ KeyStopTransition *rightStopLeft = new KeyStopTransition(this, QEvent::KeyPress, Qt::Key_Right);
+ rightStopLeft->setTargetState(stopState);
+ KeyMoveTransition *rightMoveLeft = new KeyMoveTransition(this, QEvent::KeyPress, Qt::Key_Right);
+ rightMoveLeft->setTargetState(moveStateLeft);
+ KeyMoveTransition *leftMoveLeft = new KeyMoveTransition(this, QEvent::KeyPress,Qt::Key_Left);
+ leftMoveLeft->setTargetState(moveStateLeft);
+ KeyMoveTransition *leftMoveStop = new KeyMoveTransition(this, QEvent::KeyPress,Qt::Key_Left);
+ leftMoveStop->setTargetState(moveStateLeft);
+
+ //We set up the right move state
+ moveStateRight->addTransition(leftStopRight);
+ moveStateRight->addTransition(leftMoveRight);
+ moveStateRight->addTransition(rightMoveRight);
+ stopState->addTransition(rightMoveStop);
+
+ //We set up the left move state
+ moveStateLeft->addTransition(rightStopLeft);
+ moveStateLeft->addTransition(leftMoveLeft);
+ moveStateLeft->addTransition(rightMoveLeft);
+ stopState->addTransition(leftMoveStop);
+
+ //The animation is finished, it means we reached the border of the screen, the boat is stopped so we move to the stop state
+ moveStateLeft->addTransition(movementAnimation, SIGNAL(finished()), stopState);
+ moveStateRight->addTransition(movementAnimation, SIGNAL(finished()), stopState);
+
+ //We set up the keys for dropping bombs
+ KeyLaunchTransition *upFireLeft = new KeyLaunchTransition(this, QEvent::KeyPress, Qt::Key_Up);
+ upFireLeft->setTargetState(launchStateRight);
+ KeyLaunchTransition *upFireRight = new KeyLaunchTransition(this, QEvent::KeyPress, Qt::Key_Up);
+ upFireRight->setTargetState(launchStateRight);
+ KeyLaunchTransition *upFireStop = new KeyLaunchTransition(this, QEvent::KeyPress, Qt::Key_Up);
+ upFireStop->setTargetState(launchStateRight);
+ KeyLaunchTransition *downFireLeft = new KeyLaunchTransition(this, QEvent::KeyPress, Qt::Key_Down);
+ downFireLeft->setTargetState(launchStateLeft);
+ KeyLaunchTransition *downFireRight = new KeyLaunchTransition(this, QEvent::KeyPress, Qt::Key_Down);
+ downFireRight->setTargetState(launchStateLeft);
+ KeyLaunchTransition *downFireMove = new KeyLaunchTransition(this, QEvent::KeyPress, Qt::Key_Down);
+ downFireMove->setTargetState(launchStateLeft);
+
+ //We set up transitions for fire up
+ moveStateRight->addTransition(upFireRight);
+ moveStateLeft->addTransition(upFireLeft);
+ stopState->addTransition(upFireStop);
+
+ //We set up transitions for fire down
+ moveStateRight->addTransition(downFireRight);
+ moveStateLeft->addTransition(downFireLeft);
+ stopState->addTransition(downFireMove);
+
+ //Finally the launch state should come back to its original state
+ QHistoryState *historyState = new QHistoryState(moving);
+ launchStateLeft->addTransition(historyState);
+ launchStateRight->addTransition(historyState);
+
+ QFinalState *final = new QFinalState(machine);
+
+ //This state play the destroyed animation
+ QAnimationState *destroyedState = new QAnimationState(machine);
+ destroyedState->setAnimation(destroyAnimation);
+
+ //Play a nice animation when the boat is destroyed
+ moving->addTransition(this, SIGNAL(boatDestroyed()), destroyedState);
+
+ //Transition to final state when the destroyed animation is finished
+ destroyedState->addTransition(destroyedState, SIGNAL(animationFinished()), final);
+
+ //The machine has finished to be executed, then the boat is dead
+ connect(machine,SIGNAL(finished()), this, SIGNAL(boatExecutionFinished()));
+
+}
+
+void Boat::run()
+{
+ //We register animations
+ AnimationManager::self()->registerAnimation(movementAnimation);
+ AnimationManager::self()->registerAnimation(destroyAnimation);
+ machine->start();
+}
+
+void Boat::stop()
+{
+ movementAnimation->stop();
+ machine->stop();
+}
+
+void Boat::updateBoatMovement()
+{
+ if (speed == 0 || direction == Boat::None) {
+ movementAnimation->stop();
+ return;
+ }
+
+ movementAnimation->stop();
+
+ if (direction == Boat::Left) {
+ movementAnimation->setEndValue(QPointF(0,y()));
+ movementAnimation->setDuration(x()/speed*15);
+ }
+ else /*if (direction == Boat::Right)*/ {
+ movementAnimation->setEndValue(QPointF(scene()->width()-size().width(),y()));
+ movementAnimation->setDuration((scene()->width()-size().width()-x())/speed*15);
+ }
+ movementAnimation->start();
+}
+
+void Boat::destroy()
+{
+ movementAnimation->stop();
+ emit boatDestroyed();
+}
+
+int Boat::bombsLaunched() const
+{
+ return bombsAlreadyLaunched;
+}
+
+void Boat::setBombsLaunched(int number)
+{
+ if (number > MAX_BOMB) {
+ qWarning("Boat::setBombsLaunched : It impossible to launch that number of bombs");
+ return;
+ }
+ bombsAlreadyLaunched = number;
+}
+
+int Boat::currentSpeed() const
+{
+ return speed;
+}
+
+void Boat::setCurrentSpeed(int speed)
+{
+ if (speed > 3 || speed < 0) {
+ qWarning("Boat::setCurrentSpeed: The boat can't run on that speed");
+ return;
+ }
+ this->speed = speed;
+}
+
+enum Boat::Movement Boat::currentDirection() const
+{
+ return direction;
+}
+
+void Boat::setCurrentDirection(Movement direction)
+{
+ this->direction = direction;
+}
+
+int Boat::type() const
+{
+ return Type;
+}
diff --git a/examples/widgets/animation/sub-attaq/boat.h b/examples/widgets/animation/sub-attaq/boat.h
new file mode 100644
index 0000000000..0b2fe5c8eb
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/boat.h
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef __BOAT__H__
+#define __BOAT__H__
+
+#include "pixmapitem.h"
+
+class Bomb;
+QT_BEGIN_NAMESPACE
+class QVariantAnimation;
+class QAbstractAnimation;
+class QStateMachine;
+QT_END_NAMESPACE
+
+class Boat : public PixmapItem
+{
+Q_OBJECT
+public:
+ enum Movement {
+ None = 0,
+ Left,
+ Right
+ };
+ enum { Type = UserType + 2 };
+ Boat();
+ void destroy();
+ void run();
+ void stop();
+
+ int bombsLaunched() const;
+ void setBombsLaunched(int number);
+
+ int currentSpeed() const;
+ void setCurrentSpeed(int speed);
+
+ enum Movement currentDirection() const;
+ void setCurrentDirection(Movement direction);
+
+ void updateBoatMovement();
+
+ virtual int type() const;
+
+signals:
+ void boatDestroyed();
+ void boatExecutionFinished();
+
+private:
+ int speed;
+ int bombsAlreadyLaunched;
+ Movement direction;
+ QVariantAnimation *movementAnimation;
+ QAbstractAnimation *destroyAnimation;
+ QStateMachine *machine;
+};
+
+#endif //__BOAT__H__
diff --git a/examples/widgets/animation/sub-attaq/boat_p.h b/examples/widgets/animation/sub-attaq/boat_p.h
new file mode 100644
index 0000000000..38be985777
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/boat_p.h
@@ -0,0 +1,232 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef BOAT_P_H
+#define BOAT_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+//Own
+#include "bomb.h"
+#include "graphicsscene.h"
+
+// Qt
+#include <QtWidgets/QKeyEventTransition>
+
+static const int MAX_BOMB = 5;
+
+
+//These transtion test if we have to stop the boat (i.e current speed is 1)
+class KeyStopTransition : public QKeyEventTransition
+{
+public:
+ KeyStopTransition(Boat *b, QEvent::Type t, int k)
+ : QKeyEventTransition(b, t, k), boat(b), key(k)
+ {
+ }
+protected:
+ virtual bool eventTest(QEvent *event)
+ {
+ if (!QKeyEventTransition::eventTest(event))
+ return false;
+ return (boat->currentSpeed() == 1);
+ }
+private:
+ Boat * boat;
+ int key;
+};
+
+//These transtion test if we have to move the boat (i.e current speed was 0 or another value)
+ class KeyMoveTransition : public QKeyEventTransition
+{
+public:
+ KeyMoveTransition(Boat *b, QEvent::Type t, int k)
+ : QKeyEventTransition(b, t, k), boat(b), key(k)
+ {
+ }
+protected:
+ virtual bool eventTest(QEvent *event)
+ {
+ if (!QKeyEventTransition::eventTest(event))
+ return false;
+ return (boat->currentSpeed() >= 0);
+ }
+ void onTransition(QEvent *)
+ {
+ //We decrease the speed if needed
+ if (key == Qt::Key_Left && boat->currentDirection() == Boat::Right)
+ boat->setCurrentSpeed(boat->currentSpeed() - 1);
+ else if (key == Qt::Key_Right && boat->currentDirection() == Boat::Left)
+ boat->setCurrentSpeed(boat->currentSpeed() - 1);
+ else if (boat->currentSpeed() < 3)
+ boat->setCurrentSpeed(boat->currentSpeed() + 1);
+ boat->updateBoatMovement();
+ }
+private:
+ Boat * boat;
+ int key;
+};
+
+//This transition trigger the bombs launch
+ class KeyLaunchTransition : public QKeyEventTransition
+{
+public:
+ KeyLaunchTransition(Boat *boat, QEvent::Type type, int key)
+ : QKeyEventTransition(boat, type, key), boat(boat), key(key)
+ {
+ }
+protected:
+ virtual bool eventTest(QEvent *event)
+ {
+ if (!QKeyEventTransition::eventTest(event))
+ return false;
+ //We have enough bomb?
+ return (boat->bombsLaunched() < MAX_BOMB);
+ }
+private:
+ Boat * boat;
+ int key;
+};
+
+//This state is describing when the boat is moving right
+class MoveStateRight : public QState
+{
+public:
+ MoveStateRight(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ {
+ }
+protected:
+ void onEntry(QEvent *)
+ {
+ boat->setCurrentDirection(Boat::Right);
+ boat->updateBoatMovement();
+ }
+private:
+ Boat * boat;
+};
+
+ //This state is describing when the boat is moving left
+class MoveStateLeft : public QState
+{
+public:
+ MoveStateLeft(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ {
+ }
+protected:
+ void onEntry(QEvent *)
+ {
+ boat->setCurrentDirection(Boat::Left);
+ boat->updateBoatMovement();
+ }
+private:
+ Boat * boat;
+};
+
+//This state is describing when the boat is in a stand by position
+class StopState : public QState
+{
+public:
+ StopState(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ {
+ }
+protected:
+ void onEntry(QEvent *)
+ {
+ boat->setCurrentSpeed(0);
+ boat->setCurrentDirection(Boat::None);
+ boat->updateBoatMovement();
+ }
+private:
+ Boat * boat;
+};
+
+//This state is describing the launch of the torpedo on the right
+class LaunchStateRight : public QState
+{
+public:
+ LaunchStateRight(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ {
+ }
+protected:
+ void onEntry(QEvent *)
+ {
+ Bomb *b = new Bomb();
+ b->setPos(boat->x()+boat->size().width(),boat->y());
+ GraphicsScene *scene = static_cast<GraphicsScene *>(boat->scene());
+ scene->addItem(b);
+ b->launch(Bomb::Right);
+ boat->setBombsLaunched(boat->bombsLaunched() + 1);
+ }
+private:
+ Boat * boat;
+};
+
+//This state is describing the launch of the torpedo on the left
+class LaunchStateLeft : public QState
+{
+public:
+ LaunchStateLeft(Boat *boat,QState *parent = 0) : QState(parent), boat(boat)
+ {
+ }
+protected:
+ void onEntry(QEvent *)
+ {
+ Bomb *b = new Bomb();
+ b->setPos(boat->x() - b->size().width(), boat->y());
+ GraphicsScene *scene = static_cast<GraphicsScene *>(boat->scene());
+ scene->addItem(b);
+ b->launch(Bomb::Left);
+ boat->setBombsLaunched(boat->bombsLaunched() + 1);
+ }
+private:
+ Boat * boat;
+};
+
+#endif // BOAT_P_H
diff --git a/examples/widgets/animation/sub-attaq/bomb.cpp b/examples/widgets/animation/sub-attaq/bomb.cpp
new file mode 100644
index 0000000000..e47e9423a9
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/bomb.cpp
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//Own
+#include "bomb.h"
+#include "submarine.h"
+#include "pixmapitem.h"
+#include "animationmanager.h"
+#include "qanimationstate.h"
+
+//Qt
+#include <QtCore/QSequentialAnimationGroup>
+#include <QtCore/QPropertyAnimation>
+#include <QtCore/QStateMachine>
+#include <QtCore/QFinalState>
+
+Bomb::Bomb() : PixmapItem(QString("bomb"), GraphicsScene::Big)
+{
+ setZValue(2);
+}
+
+void Bomb::launch(Bomb::Direction direction)
+{
+ QSequentialAnimationGroup *launchAnimation = new QSequentialAnimationGroup;
+ AnimationManager::self()->registerAnimation(launchAnimation);
+ qreal delta = direction == Right ? 20 : - 20;
+ QPropertyAnimation *anim = new QPropertyAnimation(this, "pos");
+ anim->setEndValue(QPointF(x() + delta,y() - 20));
+ anim->setDuration(150);
+ launchAnimation->addAnimation(anim);
+ anim = new QPropertyAnimation(this, "pos");
+ anim->setEndValue(QPointF(x() + delta*2, y() ));
+ anim->setDuration(150);
+ launchAnimation->addAnimation(anim);
+ anim = new QPropertyAnimation(this, "pos");
+ anim->setEndValue(QPointF(x() + delta*2,scene()->height()));
+ anim->setDuration(y()/2*60);
+ launchAnimation->addAnimation(anim);
+ connect(anim,SIGNAL(valueChanged(QVariant)),this,SLOT(onAnimationLaunchValueChanged(QVariant)));
+ connect(this, SIGNAL(bombExploded()), launchAnimation, SLOT(stop()));
+ //We setup the state machine of the bomb
+ QStateMachine *machine = new QStateMachine(this);
+
+ //This state is when the launch animation is playing
+ QAnimationState *launched = new QAnimationState(machine);
+ launched->setAnimation(launchAnimation);
+
+ //End
+ QFinalState *final = new QFinalState(machine);
+
+ machine->setInitialState(launched);
+
+ //### Add a nice animation when the bomb is destroyed
+ launched->addTransition(this, SIGNAL(bombExploded()),final);
+
+ //If the animation is finished, then we move to the final state
+ launched->addTransition(launched, SIGNAL(animationFinished()), final);
+
+ //The machine has finished to be executed, then the boat is dead
+ connect(machine,SIGNAL(finished()),this, SIGNAL(bombExecutionFinished()));
+
+ machine->start();
+
+}
+
+void Bomb::onAnimationLaunchValueChanged(const QVariant &)
+{
+ foreach (QGraphicsItem * item , collidingItems(Qt::IntersectsItemBoundingRect)) {
+ if (item->type() == SubMarine::Type) {
+ SubMarine *s = static_cast<SubMarine *>(item);
+ destroy();
+ s->destroy();
+ }
+ }
+}
+
+void Bomb::destroy()
+{
+ emit bombExploded();
+}
diff --git a/examples/widgets/animation/sub-attaq/bomb.h b/examples/widgets/animation/sub-attaq/bomb.h
new file mode 100644
index 0000000000..74ed734caf
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/bomb.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef __BOMB__H__
+#define __BOMB__H__
+
+#include "pixmapitem.h"
+
+class Bomb : public PixmapItem
+{
+Q_OBJECT
+public:
+ enum Direction {
+ Left = 0,
+ Right
+ };
+ Bomb();
+ void launch(Direction direction);
+ void destroy();
+
+signals:
+ void bombExploded();
+ void bombExecutionFinished();
+
+private slots:
+ void onAnimationLaunchValueChanged(const QVariant &);
+};
+
+#endif //__BOMB__H__
diff --git a/examples/widgets/animation/sub-attaq/data.xml b/examples/widgets/animation/sub-attaq/data.xml
new file mode 100644
index 0000000000..0f30515ddf
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/data.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<subattaq>
+ <submarines>
+ <submarine type="0" points="10" name="Q1" />
+ <submarine type="1" points="20" name="Q2" />
+ </submarines>
+ <levels>
+ <level id="0" name="Seaman recruit">
+ <subinstance type="0" nb="1"/>
+ </level>
+ <level id="1" name="Seaman apprentice">
+ <subinstance type="0" nb="2"/>
+ </level>
+ <level id="2" name="Seaman">
+ <subinstance type="0" nb="4"/>
+ </level>
+ <level id="3" name="Petty Officer Third Class">
+ <subinstance type="0" nb="6"/>
+ </level>
+ <level id="4" name="Petty Officer Second Class">
+ <subinstance type="0" nb="6"/>
+ </level>
+ <level id="5" name="Petty Officer First Class">
+ <subinstance type="0" nb="8"/>
+ </level>
+ <level id="6" name="Lieutenant">
+ <subinstance type="0" nb="10"/>
+ </level>
+ <level id="7" name="Commander">
+ <subinstance type="0" nb="15"/>
+ </level>
+ <level id="8" name="Captain">
+ <subinstance type="0" nb="12"/>
+ </level>
+ <level id="9" name="Admiral">
+ <subinstance type="0" nb="12"/>
+ </level>
+ </levels>
+</subattaq>
diff --git a/examples/widgets/animation/sub-attaq/graphicsscene.cpp b/examples/widgets/animation/sub-attaq/graphicsscene.cpp
new file mode 100644
index 0000000000..a2b3e2f101
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/graphicsscene.cpp
@@ -0,0 +1,282 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//Own
+#include "graphicsscene.h"
+#include "states.h"
+#include "boat.h"
+#include "submarine.h"
+#include "torpedo.h"
+#include "bomb.h"
+#include "pixmapitem.h"
+#include "animationmanager.h"
+#include "qanimationstate.h"
+#include "progressitem.h"
+#include "textinformationitem.h"
+
+//Qt
+#include <QtCore/QPropertyAnimation>
+#include <QtCore/QSequentialAnimationGroup>
+#include <QtCore/QParallelAnimationGroup>
+#include <QtCore/QStateMachine>
+#include <QtCore/QFinalState>
+#include <QtCore/QPauseAnimation>
+#include <QtWidgets/QAction>
+#include <QtCore/QDir>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QMessageBox>
+#include <QtWidgets/QGraphicsView>
+#include <QtWidgets/QGraphicsSceneMouseEvent>
+#include <QtCore/QXmlStreamReader>
+
+GraphicsScene::GraphicsScene(int x, int y, int width, int height, Mode mode)
+ : QGraphicsScene(x , y, width, height), mode(mode), boat(new Boat)
+{
+ PixmapItem *backgroundItem = new PixmapItem(QString("background"),mode);
+ backgroundItem->setZValue(1);
+ backgroundItem->setPos(0,0);
+ addItem(backgroundItem);
+
+ PixmapItem *surfaceItem = new PixmapItem(QString("surface"),mode);
+ surfaceItem->setZValue(3);
+ surfaceItem->setPos(0,sealLevel() - surfaceItem->boundingRect().height()/2);
+ addItem(surfaceItem);
+
+ //The item that display score and level
+ progressItem = new ProgressItem(backgroundItem);
+
+ textInformationItem = new TextInformationItem(backgroundItem);
+ textInformationItem->hide();
+ //We create the boat
+ addItem(boat);
+ boat->setPos(this->width()/2, sealLevel() - boat->size().height());
+ boat->hide();
+
+ //parse the xml that contain all data of the game
+ QXmlStreamReader reader;
+ QFile file(":data.xml");
+ file.open(QIODevice::ReadOnly);
+ reader.setDevice(&file);
+ LevelDescription currentLevel;
+ while (!reader.atEnd()) {
+ reader.readNext();
+ if (reader.tokenType() == QXmlStreamReader::StartElement) {
+ if (reader.name() == "submarine") {
+ SubmarineDescription desc;
+ desc.name = reader.attributes().value("name").toString();
+ desc.points = reader.attributes().value("points").toString().toInt();
+ desc.type = reader.attributes().value("type").toString().toInt();
+ submarinesData.append(desc);
+ } else if (reader.name() == "level") {
+ currentLevel.id = reader.attributes().value("id").toString().toInt();
+ currentLevel.name = reader.attributes().value("name").toString();
+ } else if (reader.name() == "subinstance") {
+ currentLevel.submarines.append(qMakePair(reader.attributes().value("type").toString().toInt(), reader.attributes().value("nb").toString().toInt()));
+ }
+ } else if (reader.tokenType() == QXmlStreamReader::EndElement) {
+ if (reader.name() == "level") {
+ levelsData.insert(currentLevel.id, currentLevel);
+ currentLevel.submarines.clear();
+ }
+ }
+ }
+}
+
+qreal GraphicsScene::sealLevel() const
+{
+ return (mode == Big) ? 220 : 160;
+}
+
+void GraphicsScene::setupScene(QAction *newAction, QAction *quitAction)
+{
+ static const int nLetters = 10;
+ static struct {
+ char const *pix;
+ qreal initX, initY;
+ qreal destX, destY;
+ } logoData[nLetters] = {
+ {"s", -1000, -1000, 300, 150 },
+ {"u", -800, -1000, 350, 150 },
+ {"b", -600, -1000, 400, 120 },
+ {"dash", -400, -1000, 460, 150 },
+ {"a", 1000, 2000, 350, 250 },
+ {"t", 800, 2000, 400, 250 },
+ {"t2", 600, 2000, 430, 250 },
+ {"a2", 400, 2000, 465, 250 },
+ {"q", 200, 2000, 510, 250 },
+ {"excl", 0, 2000, 570, 220 } };
+
+ QSequentialAnimationGroup * lettersGroupMoving = new QSequentialAnimationGroup(this);
+ QParallelAnimationGroup * lettersGroupFading = new QParallelAnimationGroup(this);
+
+ for (int i = 0; i < nLetters; ++i) {
+ PixmapItem *logo = new PixmapItem(QLatin1String(":/logo-") + logoData[i].pix, this);
+ logo->setPos(logoData[i].initX, logoData[i].initY);
+ logo->setZValue(i + 3);
+ //creation of the animations for moving letters
+ QPropertyAnimation *moveAnim = new QPropertyAnimation(logo, "pos", lettersGroupMoving);
+ moveAnim->setEndValue(QPointF(logoData[i].destX, logoData[i].destY));
+ moveAnim->setDuration(200);
+ moveAnim->setEasingCurve(QEasingCurve::OutElastic);
+ lettersGroupMoving->addPause(50);
+ //creation of the animations for fading out the letters
+ QPropertyAnimation *fadeAnim = new QPropertyAnimation(logo, "opacity", lettersGroupFading);
+ fadeAnim->setDuration(800);
+ fadeAnim->setEndValue(0);
+ fadeAnim->setEasingCurve(QEasingCurve::OutQuad);
+ }
+
+ QStateMachine *machine = new QStateMachine(this);
+
+ //This state is when the player is playing
+ PlayState *gameState = new PlayState(this, machine);
+
+ //Final state
+ QFinalState *final = new QFinalState(machine);
+
+ //Animation when the player enter in the game
+ QAnimationState *lettersMovingState = new QAnimationState(machine);
+ lettersMovingState->setAnimation(lettersGroupMoving);
+
+ //Animation when the welcome screen disappear
+ QAnimationState *lettersFadingState = new QAnimationState(machine);
+ lettersFadingState->setAnimation(lettersGroupFading);
+
+ //if new game then we fade out the welcome screen and start playing
+ lettersMovingState->addTransition(newAction, SIGNAL(triggered()), lettersFadingState);
+ lettersFadingState->addTransition(lettersFadingState, SIGNAL(animationFinished()), gameState);
+
+ //New Game is triggered then player start playing
+ gameState->addTransition(newAction, SIGNAL(triggered()), gameState);
+
+ //Wanna quit, then connect to CTRL+Q
+ gameState->addTransition(quitAction, SIGNAL(triggered()), final);
+ lettersMovingState->addTransition(quitAction, SIGNAL(triggered()), final);
+
+ //Welcome screen is the initial state
+ machine->setInitialState(lettersMovingState);
+
+ machine->start();
+
+ //We reach the final state, then we quit
+ connect(machine, SIGNAL(finished()), qApp, SLOT(quit()));
+}
+
+void GraphicsScene::addItem(Bomb *bomb)
+{
+ bombs.insert(bomb);
+ connect(bomb,SIGNAL(bombExecutionFinished()),this, SLOT(onBombExecutionFinished()));
+ QGraphicsScene::addItem(bomb);
+}
+
+void GraphicsScene::addItem(Torpedo *torpedo)
+{
+ torpedos.insert(torpedo);
+ connect(torpedo,SIGNAL(torpedoExecutionFinished()),this, SLOT(onTorpedoExecutionFinished()));
+ QGraphicsScene::addItem(torpedo);
+}
+
+void GraphicsScene::addItem(SubMarine *submarine)
+{
+ submarines.insert(submarine);
+ connect(submarine,SIGNAL(subMarineExecutionFinished()),this, SLOT(onSubMarineExecutionFinished()));
+ QGraphicsScene::addItem(submarine);
+}
+
+void GraphicsScene::addItem(QGraphicsItem *item)
+{
+ QGraphicsScene::addItem(item);
+}
+
+void GraphicsScene::onBombExecutionFinished()
+{
+ Bomb *bomb = qobject_cast<Bomb *>(sender());
+ bombs.remove(bomb);
+ bomb->deleteLater();
+ if (boat)
+ boat->setBombsLaunched(boat->bombsLaunched() - 1);
+}
+
+void GraphicsScene::onTorpedoExecutionFinished()
+{
+ Torpedo *torpedo = qobject_cast<Torpedo *>(sender());
+ torpedos.remove(torpedo);
+ torpedo->deleteLater();
+}
+
+void GraphicsScene::onSubMarineExecutionFinished()
+{
+ SubMarine *submarine = qobject_cast<SubMarine *>(sender());
+ submarines.remove(submarine);
+ if (submarines.count() == 0)
+ emit allSubMarineDestroyed(submarine->points());
+ else
+ emit subMarineDestroyed(submarine->points());
+ submarine->deleteLater();
+}
+
+void GraphicsScene::clearScene()
+{
+ foreach (SubMarine *sub, submarines) {
+ sub->destroy();
+ sub->deleteLater();
+ }
+
+ foreach (Torpedo *torpedo, torpedos) {
+ torpedo->destroy();
+ torpedo->deleteLater();
+ }
+
+ foreach (Bomb *bomb, bombs) {
+ bomb->destroy();
+ bomb->deleteLater();
+ }
+
+ submarines.clear();
+ bombs.clear();
+ torpedos.clear();
+
+ AnimationManager::self()->unregisterAllAnimations();
+
+ boat->stop();
+ boat->hide();
+ boat->setEnabled(true);
+}
diff --git a/examples/widgets/animation/sub-attaq/graphicsscene.h b/examples/widgets/animation/sub-attaq/graphicsscene.h
new file mode 100644
index 0000000000..3e571a878c
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/graphicsscene.h
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef __GRAPHICSSCENE__H__
+#define __GRAPHICSSCENE__H__
+
+//Qt
+#include <QtWidgets/QGraphicsScene>
+#include <QtCore/QSet>
+#include <QtCore/QState>
+
+
+class Boat;
+class SubMarine;
+class Torpedo;
+class Bomb;
+class PixmapItem;
+class ProgressItem;
+class TextInformationItem;
+QT_BEGIN_NAMESPACE
+class QAction;
+QT_END_NAMESPACE
+
+class GraphicsScene : public QGraphicsScene
+{
+Q_OBJECT
+public:
+ enum Mode {
+ Big = 0,
+ Small
+ };
+
+ struct SubmarineDescription {
+ int type;
+ int points;
+ QString name;
+ };
+
+ struct LevelDescription {
+ int id;
+ QString name;
+ QList<QPair<int,int> > submarines;
+ };
+
+ GraphicsScene(int x, int y, int width, int height, Mode mode = Big);
+ qreal sealLevel() const;
+ void setupScene(QAction *newAction, QAction *quitAction);
+ void addItem(Bomb *bomb);
+ void addItem(Torpedo *torpedo);
+ void addItem(SubMarine *submarine);
+ void addItem(QGraphicsItem *item);
+ void clearScene();
+
+signals:
+ void subMarineDestroyed(int);
+ void allSubMarineDestroyed(int);
+
+private slots:
+ void onBombExecutionFinished();
+ void onTorpedoExecutionFinished();
+ void onSubMarineExecutionFinished();
+
+private:
+ Mode mode;
+ ProgressItem *progressItem;
+ TextInformationItem *textInformationItem;
+ Boat *boat;
+ QSet<SubMarine *> submarines;
+ QSet<Bomb *> bombs;
+ QSet<Torpedo *> torpedos;
+ QVector<SubmarineDescription> submarinesData;
+ QHash<int, LevelDescription> levelsData;
+
+ friend class PauseState;
+ friend class PlayState;
+ friend class LevelState;
+ friend class LostState;
+ friend class WinState;
+ friend class WinTransition;
+ friend class UpdateScoreTransition;
+};
+
+#endif //__GRAPHICSSCENE__H__
+
diff --git a/examples/widgets/animation/sub-attaq/main.cpp b/examples/widgets/animation/sub-attaq/main.cpp
new file mode 100644
index 0000000000..df18c83435
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/main.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtWidgets>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Q_INIT_RESOURCE(subattaq);
+
+ qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
+
+ MainWindow w;
+ w.show();
+
+ return app.exec();
+}
diff --git a/examples/widgets/animation/sub-attaq/mainwindow.cpp b/examples/widgets/animation/sub-attaq/mainwindow.cpp
new file mode 100644
index 0000000000..70f0303177
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/mainwindow.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//Own
+#include "mainwindow.h"
+#include "graphicsscene.h"
+
+//Qt
+#include <QGraphicsView>
+#include <QApplication>
+#include <QMenu>
+#include <QMenuBar>
+#include <QLayout>
+
+#ifndef QT_NO_OPENGL
+# include <QtOpenGL/QtOpenGL>
+#endif
+
+MainWindow::MainWindow() : QMainWindow(0)
+{
+ QMenu *file = menuBar()->addMenu(tr("&File"));
+
+ QAction *newAction = file->addAction(tr("New Game"));
+ newAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_N));
+ QAction *quitAction = file->addAction(tr("Quit"));
+ quitAction->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Q));
+
+ if (QApplication::arguments().contains("-fullscreen")) {
+ scene = new GraphicsScene(0, 0, 750, 400, GraphicsScene::Small);
+ setWindowState(Qt::WindowFullScreen);
+ } else {
+ scene = new GraphicsScene(0, 0, 880, 630);
+ layout()->setSizeConstraint(QLayout::SetFixedSize);
+ }
+
+ view = new QGraphicsView(scene, this);
+ view->setAlignment(Qt::AlignLeft | Qt::AlignTop);
+ scene->setupScene(newAction, quitAction);
+#ifndef QT_NO_OPENGL
+ view->setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
+#endif
+
+ setCentralWidget(view);
+}
diff --git a/examples/widgets/animation/sub-attaq/mainwindow.h b/examples/widgets/animation/sub-attaq/mainwindow.h
new file mode 100644
index 0000000000..596157d38f
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/mainwindow.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef __MAINWINDOW__H__
+#define __MAINWINDOW__H__
+
+//Qt
+#include <QtWidgets/QMainWindow>
+class GraphicsScene;
+QT_BEGIN_NAMESPACE
+class QGraphicsView;
+QT_END_NAMESPACE
+
+class MainWindow : public QMainWindow
+{
+Q_OBJECT
+public:
+ MainWindow();
+
+private:
+ GraphicsScene *scene;
+ QGraphicsView *view;
+};
+
+#endif //__MAINWINDOW__H__
diff --git a/examples/widgets/animation/sub-attaq/pics/big/background.png b/examples/widgets/animation/sub-attaq/pics/big/background.png
new file mode 100644
index 0000000000..9f581571fa
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/background.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/boat.png b/examples/widgets/animation/sub-attaq/pics/big/boat.png
new file mode 100644
index 0000000000..be82dff62a
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/boat.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/bomb.png b/examples/widgets/animation/sub-attaq/pics/big/bomb.png
new file mode 100644
index 0000000000..3af5f2f29c
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/bomb.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step1.png b/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step1.png
new file mode 100644
index 0000000000..c9fd8b0984
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step1.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step2.png b/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step2.png
new file mode 100644
index 0000000000..7528f2d2da
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step2.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step3.png b/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step3.png
new file mode 100644
index 0000000000..aae9c9c184
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step3.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step4.png b/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step4.png
new file mode 100644
index 0000000000..d697c1bae8
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/explosion/boat/step4.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step1.png b/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step1.png
new file mode 100644
index 0000000000..88ca5144b7
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step1.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step2.png b/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step2.png
new file mode 100644
index 0000000000..524f5890ee
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step2.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step3.png b/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step3.png
new file mode 100644
index 0000000000..2cca1e80fe
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step3.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step4.png b/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step4.png
new file mode 100644
index 0000000000..82100a8260
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/explosion/submarine/step4.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/submarine.png b/examples/widgets/animation/sub-attaq/pics/big/submarine.png
new file mode 100644
index 0000000000..df435dc47d
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/submarine.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/surface.png b/examples/widgets/animation/sub-attaq/pics/big/surface.png
new file mode 100644
index 0000000000..4eba29e9cd
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/surface.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/big/torpedo.png b/examples/widgets/animation/sub-attaq/pics/big/torpedo.png
new file mode 100644
index 0000000000..f9c26873f1
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/big/torpedo.png
Binary files differ
diff --git a/examples/widgets/animation/sub-attaq/pics/scalable/background-n810.svg b/examples/widgets/animation/sub-attaq/pics/scalable/background-n810.svg
new file mode 100644
index 0000000000..ece9f7aaf1
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/scalable/background-n810.svg
@@ -0,0 +1,171 @@
+<?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"
+ version="1.0"
+ width="744.09448"
+ height="1052.3622"
+ id="svg2588"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="background-n810.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <metadata
+ id="metadata28">
+ <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="1141"
+ inkscape:window-width="1920"
+ 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"
+ showgrid="false"
+ inkscape:zoom="1.2399902"
+ inkscape:cx="375"
+ inkscape:cy="461.074"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:current-layer="layer1" />
+ <defs
+ id="defs2590">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective30" />
+ <linearGradient
+ id="linearGradient3746">
+ <stop
+ id="stop3748"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3750"
+ style="stop-color:#0074b7;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="82.966125"
+ cy="-178.42453"
+ r="526.79456"
+ fx="82.966125"
+ fy="-178.42453"
+ id="radialGradient3880"
+ xlink:href="#linearGradient3746"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4952094,0.2388475,-0.1040669,0.3734391,-208.61982,418.216)" />
+ <linearGradient
+ id="linearGradient3624">
+ <stop
+ id="stop3626"
+ style="stop-color:#3a8daf;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3636"
+ style="stop-color:#252525;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="552.98486"
+ y1="390.56842"
+ x2="549.39465"
+ y2="702.3479"
+ id="linearGradient3630"
+ xlink:href="#linearGradient3624"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.3373776,0,0,1.186038,-986.88716,67.776416)" />
+ <linearGradient
+ id="linearGradient3816">
+ <stop
+ id="stop3818"
+ style="stop-color:#ad8b00;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3820"
+ style="stop-color:#ad8b00;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="573"
+ y1="755.46222"
+ x2="573"
+ y2="700.13464"
+ id="linearGradient3826"
+ xlink:href="#linearGradient3816"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2561681,-151.5,-34.518664)" />
+ <linearGradient
+ id="linearGradient5097">
+ <stop
+ id="stop5099"
+ style="stop-color:#19a2db;stop-opacity:0"
+ offset="0" />
+ <stop
+ id="stop5109"
+ style="stop-color:#1379a7;stop-opacity:0.49803922"
+ offset="0.30000001" />
+ <stop
+ id="stop5101"
+ style="stop-color:#0e5173;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="590.84674"
+ y1="274.57559"
+ x2="590.84674"
+ y2="334.01376"
+ id="linearGradient5103"
+ xlink:href="#linearGradient5097"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-151.5,156.75229)"
+ spreadMethod="pad" />
+ </defs>
+ <g
+ id="layer1">
+ <rect
+ width="1053.5891"
+ height="206.64989"
+ x="-151.79456"
+ y="330.16019"
+ id="rect3638"
+ style="opacity:1;fill:url(#radialGradient3880);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4.1880002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ width="1054.4708"
+ height="364.81519"
+ x="-152.23541"
+ y="533.48895"
+ id="rect3622"
+ style="opacity:1;fill:url(#linearGradient3630);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4.13464069;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M -152.5,877.11847 C 120.5,865.81296 -202.86309,769.3663 109.5,871.29717 C 172.96247,892.00636 243.5,872.55334 297.5,871.29717 C 351.5,870.041 311.5,859.80335 358.5,876.13354 C 405.5,892.46372 553.5,861.09903 598.5,854.8182 C 643.5,848.53736 756.5,841.79698 795.5,853.10249 C 834.5,864.408 904.5,866.2725 904.5,866.2725 L 901.5,903.95754 L -154.5,902.70137 L -152.5,877.11847 z"
+ id="path3814"
+ style="fill:url(#linearGradient3826);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ d="M 902.20121,894.16261 C 632.01828,889.43035 756.73005,860.2801 614.20403,894.1311 C 596.58819,898.315 408.23621,883.21212 400.43291,894.1311 C 376.86263,927.11261 75.265447,868.1243 34.250926,886.79082 C 31.281885,888.14209 12.514878,884.22134 -12.264082,889.72008 C -48.555335,897.77353 -64.717178,885.62471 -103.31472,890.35697 C -141.91229,895.08922 -145.87102,891.93439 -145.87102,891.93439 L -152.79879,903.10131 L 892.3044,902.5755 L 902.20121,894.16261 z"
+ id="path3828"
+ style="fill:#ad8b00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+</svg>
diff --git a/examples/widgets/animation/sub-attaq/pics/scalable/background.svg b/examples/widgets/animation/sub-attaq/pics/scalable/background.svg
new file mode 100644
index 0000000000..0be268010e
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/scalable/background.svg
@@ -0,0 +1,171 @@
+<?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"
+ version="1.0"
+ width="744.09448"
+ height="1052.3622"
+ id="svg2588"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="background.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <metadata
+ id="metadata28">
+ <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="1141"
+ inkscape:window-width="1920"
+ 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"
+ showgrid="false"
+ inkscape:zoom="0.93884027"
+ inkscape:cx="473.72605"
+ inkscape:cy="538.63678"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:current-layer="layer1" />
+ <defs
+ id="defs2590">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective30" />
+ <linearGradient
+ id="linearGradient3746">
+ <stop
+ id="stop3748"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3750"
+ style="stop-color:#0074b7;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="82.966125"
+ cy="-178.42453"
+ r="526.79456"
+ fx="82.966125"
+ fy="-178.42453"
+ id="radialGradient3880"
+ xlink:href="#linearGradient3746"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4952094,0.3367191,-0.1040669,0.5264617,-208.61982,282.52272)" />
+ <linearGradient
+ id="linearGradient3624">
+ <stop
+ id="stop3626"
+ style="stop-color:#3a8daf;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3636"
+ style="stop-color:#252525;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="552.98486"
+ y1="390.56842"
+ x2="549.39465"
+ y2="702.3479"
+ id="linearGradient3630"
+ xlink:href="#linearGradient3624"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.3373776,0,0,1.5004634,-986.88716,-154.07447)" />
+ <linearGradient
+ id="linearGradient3816">
+ <stop
+ id="stop3818"
+ style="stop-color:#ad8b00;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3820"
+ style="stop-color:#ad8b00;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="573"
+ y1="755.46222"
+ x2="573"
+ y2="700.13464"
+ id="linearGradient3826"
+ xlink:href="#linearGradient3816"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.6033628,-151.5,-294.0167)" />
+ <linearGradient
+ id="linearGradient5097">
+ <stop
+ id="stop5099"
+ style="stop-color:#19a2db;stop-opacity:0"
+ offset="0" />
+ <stop
+ id="stop5109"
+ style="stop-color:#1379a7;stop-opacity:0.49803922"
+ offset="0.30000001" />
+ <stop
+ id="stop5101"
+ style="stop-color:#0e5173;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="590.84674"
+ y1="274.57559"
+ x2="590.84674"
+ y2="334.01376"
+ id="linearGradient5103"
+ xlink:href="#linearGradient5097"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-151.5,156.75229)"
+ spreadMethod="pad" />
+ </defs>
+ <g
+ id="layer1">
+ <rect
+ width="1053.5891"
+ height="291.32797"
+ x="-151.79456"
+ y="158.38464"
+ id="rect3638"
+ style="opacity:1;fill:url(#radialGradient3880);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4.1880002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ width="1054.4708"
+ height="461.52972"
+ x="-152.23541"
+ y="435.10107"
+ id="rect3622"
+ style="opacity:1;fill:url(#linearGradient3630);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4.13464069;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M -152.5,869.5896 C 120.5,855.15934 -202.86309,732.0556 109.5,862.15934 C 172.96247,888.59238 243.5,863.7627 297.5,862.15934 C 351.5,860.55598 311.5,847.48872 358.5,868.33244 C 405.5,889.17615 553.5,849.14252 598.5,841.12571 C 643.5,833.1089 756.5,824.50553 795.5,838.9358 C 834.5,853.36606 904.5,855.74589 904.5,855.74589 L 901.5,903.84677 L -154.5,902.24341 L -152.5,869.5896 z"
+ id="path3814"
+ style="fill:url(#linearGradient3826);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ d="M 902.20121,891.3446 C 632.01828,885.30439 756.73005,848.09724 614.20403,891.30439 C 596.58819,896.64468 408.23621,877.36748 400.43291,891.30439 C 376.86263,933.40172 75.265447,858.10952 34.250926,881.93531 C 31.281885,883.66006 12.514878,878.65564 -12.264082,885.67419 C -48.555335,895.95355 -64.717178,880.4469 -103.31472,886.48711 C -141.91229,892.52732 -145.87102,888.50052 -145.87102,888.50052 L -152.79879,902.75389 L 892.3044,902.08275 L 902.20121,891.3446 z"
+ id="path3828"
+ style="fill:#ad8b00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+</svg>
diff --git a/examples/widgets/animation/sub-attaq/pics/scalable/boat.svg b/examples/widgets/animation/sub-attaq/pics/scalable/boat.svg
new file mode 100644
index 0000000000..5298821ba8
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/scalable/boat.svg
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.0"
+ width="744.09448"
+ height="1052.3622"
+ id="svg2584">
+ <defs
+ id="defs2666">
+ <linearGradient
+ x1="542.5"
+ y1="222.59448"
+ x2="559"
+ y2="222.59448"
+ id="linearGradient3387"
+ xlink:href="#linearGradient3746"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-110.6791,190.19124)" />
+ <linearGradient
+ id="linearGradient3167">
+ <stop
+ id="stop3169"
+ style="stop-color:#464646;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3345"
+ style="stop-color:#848788;stop-opacity:1"
+ offset="0.44021741" />
+ <stop
+ id="stop3347"
+ style="stop-color:#9ca0a2;stop-opacity:1"
+ offset="0.56799388" />
+ <stop
+ id="stop3171"
+ style="stop-color:#b5babd;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="474.23065"
+ y1="229.92336"
+ x2="474.1944"
+ y2="218.27365"
+ id="linearGradient3416"
+ xlink:href="#linearGradient3167"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-125.98032,185.95625)" />
+ <linearGradient
+ id="linearGradient3692">
+ <stop
+ id="stop3694"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3696"
+ style="stop-color:#b6b6b6;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="573.5"
+ y1="244.2056"
+ x2="578.25"
+ y2="216.9556"
+ id="linearGradient3972"
+ xlink:href="#linearGradient3692"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-126.5541,188.56624)" />
+ <linearGradient
+ id="linearGradient3438">
+ <stop
+ id="stop3440"
+ style="stop-color:#939393;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3444"
+ style="stop-color:#d6d6d6;stop-opacity:1"
+ offset="0.12354442" />
+ <stop
+ id="stop3446"
+ style="stop-color:#dadada;stop-opacity:1"
+ offset="0.74055624" />
+ <stop
+ id="stop3442"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="660.29303"
+ y1="256.53284"
+ x2="444.79303"
+ y2="255.62085"
+ id="linearGradient3948"
+ xlink:href="#linearGradient3438"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-126.5541,185.56624)" />
+ <linearGradient
+ x1="542.5"
+ y1="222.59448"
+ x2="559"
+ y2="222.59448"
+ id="linearGradient3990"
+ xlink:href="#linearGradient3746"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-132.8041,190.19124)" />
+ <linearGradient
+ id="linearGradient3746">
+ <stop
+ id="stop3748"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3750"
+ style="stop-color:#0074b7;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="542.5"
+ y1="222.59448"
+ x2="559"
+ y2="222.59448"
+ id="linearGradient3994"
+ xlink:href="#linearGradient3746"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-88.054101,190.19124)" />
+ <linearGradient
+ id="linearGradient3428">
+ <stop
+ id="stop3430"
+ style="stop-color:#464646;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3432"
+ style="stop-color:#848788;stop-opacity:1"
+ offset="0.18306103" />
+ <stop
+ id="stop3434"
+ style="stop-color:#9ca0a2;stop-opacity:1"
+ offset="0.66368055" />
+ <stop
+ id="stop3436"
+ style="stop-color:#b5babd;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="592.92798"
+ y1="199.43727"
+ x2="557.05743"
+ y2="196.5448"
+ id="linearGradient3426"
+ xlink:href="#linearGradient3428"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-102.5217,149.09845)" />
+ </defs>
+ <g
+ id="layer1">
+ <g
+ id="boat">
+ <path
+ d="M 296.669,434.15623 C 376.12538,436.50959 448.282,436.46711 542.42304,434.15623 C 542.42304,434.15623 544.22253,425.03531 542.42304,422.57953 C 432.90655,403.86953 296.669,418.12547 296.669,422.57953 L 296.669,434.15623 z"
+ id="path3469"
+ style="fill:#a9a9a9;fill-opacity:1;fill-rule:nonzero;stroke:#484848;stroke-width:3.4975698;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1" />
+ <rect
+ width="3.4280596"
+ height="29.611124"
+ x="647.59613"
+ y="173.91156"
+ transform="matrix(0.9327494,0.3605254,-0.3633626,0.9316478,0,0)"
+ id="rect3408"
+ style="opacity:1;fill:#333333;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ width="48.499989"
+ height="8.5"
+ x="318.48221"
+ y="405.82172"
+ transform="matrix(0.9999952,3.0887777e-3,-3.0887777e-3,0.9999952,0,0)"
+ id="rect3376"
+ style="opacity:1;fill:url(#linearGradient3416);fill-opacity:1;fill-rule:nonzero;stroke:#484848;stroke-width:2.99999928;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M 382.4459,430.66072 C 382.4459,430.66072 420.85999,388.74829 397.4459,385.66072 L 488.4459,397.66072 L 488.4459,432.66072 L 382.4459,430.66072 z"
+ id="path3952"
+ style="fill:url(#linearGradient3972);fill-opacity:1;fill-rule:evenodd;stroke:#323232;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M 301.4459,429.66072 C 301.4459,429.66072 330.46329,468.66072 343.4459,468.66072 C 355.42851,471.91072 507.57644,473.70653 525.4459,465.91072 C 534.58031,461.59104 537.90602,455.58662 539.4459,429.66072 C 473.70193,439.43306 371.2651,439.78219 301.4459,429.66072 z"
+ id="path3938"
+ style="fill:url(#linearGradient3948);fill-opacity:1;fill-rule:evenodd;stroke:#545454;stroke-width:3.0999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M 339.44863,416.12222 L 357.69854,416.17859 L 368.1622,427.96097 L 339.41234,427.87217 L 339.44863,416.12222 z"
+ id="rect3378"
+ style="fill:#dedede;fill-opacity:1;fill-rule:nonzero;stroke:#484848;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1" />
+ <rect
+ width="13.5"
+ height="17"
+ x="411.19589"
+ y="404.28574"
+ id="rect3974"
+ style="opacity:1;fill:url(#linearGradient3990);fill-opacity:1;fill-rule:nonzero;stroke:#323232;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ width="13.5"
+ height="17"
+ x="455.94589"
+ y="404.28574"
+ id="rect3992"
+ style="opacity:1;fill:url(#linearGradient3994);fill-opacity:1;fill-rule:nonzero;stroke:#323232;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M 295.6959,421.91072 C 360.77923,430.41072 446.61257,432.91072 541.9459,421.91072 C 541.9459,421.91072 543.74902,428.6076 541.9459,430.41072 C 432.20839,444.14823 295.6959,433.68104 295.6959,430.41072 L 295.6959,421.91072 z"
+ id="rect2558"
+ style="fill:#dedede;fill-opacity:1;fill-rule:nonzero;stroke:#484848;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1" />
+ <rect
+ width="94.427879"
+ height="7.236649"
+ x="437.10614"
+ y="342.2645"
+ transform="matrix(0.9947793,0.1020501,-0.1079723,0.9941539,0,0)"
+ id="rect2569"
+ style="opacity:1;fill:#c1c1c1;fill-opacity:1;fill-rule:nonzero;stroke:#404040;stroke-width:3.0365274;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ width="13.5"
+ height="17"
+ x="433.32089"
+ y="404.28574"
+ id="rect3385"
+ style="opacity:1;fill:url(#linearGradient3387);fill-opacity:1;fill-rule:nonzero;stroke:#323232;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M 402.86916,380.21847 L 489.80407,388.85485 L 491.52271,394.54919 L 397.58781,384.91281 L 402.86916,380.21847 z"
+ id="rect3466"
+ style="fill:#dcdcdc;fill-opacity:1;fill-rule:nonzero;stroke:#404040;stroke-width:3.03650045;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1" />
+ <rect
+ width="34.5"
+ height="14.5"
+ x="456.4783"
+ y="336.94293"
+ transform="matrix(0.997157,7.5351915e-2,-7.5351915e-2,0.997157,0,0)"
+ id="rect3418"
+ style="opacity:1;fill:url(#linearGradient3426);fill-opacity:1;fill-rule:nonzero;stroke:#494949;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <g
+ transform="matrix(0.9246214,0.3808874,-0.3808874,0.9246214,-13.252851,-40.129692)"
+ id="flag">
+ <rect
+ width="19.75"
+ height="27.75"
+ x="193.34448"
+ y="-709"
+ transform="matrix(0,1,-1,0,0,0)"
+ id="rect3389"
+ style="opacity:1;fill:#b20000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ width="27.25"
+ height="5.75"
+ x="681.5"
+ y="200.59448"
+ id="rect3393"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ width="5.75"
+ height="19.5"
+ x="691.25"
+ y="193.59448"
+ id="rect3395"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ width="27.75"
+ height="2.5"
+ x="681.5"
+ y="202.34448"
+ id="rect3397"
+ style="opacity:1;fill:#000080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ width="3"
+ height="19.25"
+ x="692.5"
+ y="193.59448"
+ id="rect3399"
+ style="opacity:1;fill:#000080;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/examples/widgets/animation/sub-attaq/pics/scalable/bomb.svg b/examples/widgets/animation/sub-attaq/pics/scalable/bomb.svg
new file mode 100644
index 0000000000..294771a6dd
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/scalable/bomb.svg
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.0"
+ width="744.09448"
+ height="1052.3622"
+ id="svg3121">
+ <defs
+ id="defs3123">
+ <radialGradient
+ cx="-135.625"
+ cy="148.71948"
+ r="7.625"
+ fx="-135.625"
+ fy="148.71948"
+ id="radialGradient3439"
+ xlink:href="#linearGradient3366"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ x1="-132.85063"
+ y1="173.6969"
+ x2="-145.3662"
+ y2="177.59828"
+ id="linearGradient3418"
+ xlink:href="#linearGradient3366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.2134297,-0.5943658,0.6658882,-0.2391126,-274.53441,123.00067)" />
+ <linearGradient
+ x1="-141.85466"
+ y1="181.49153"
+ x2="-144.95044"
+ y2="175.90179"
+ id="linearGradient3414"
+ xlink:href="#linearGradient3366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.2134297,-0.5943658,-0.6658882,-0.2391126,-15.893355,122.67824)" />
+ <linearGradient
+ x1="-149.5"
+ y1="177.59448"
+ x2="-145.7928"
+ y2="180.05936"
+ id="linearGradient3410"
+ xlink:href="#linearGradient3366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.6315243,0,0,0.7075182,-227.03781,54.321514)" />
+ <linearGradient
+ x1="-140.46242"
+ y1="177.40488"
+ x2="-147.04802"
+ y2="172.66473"
+ id="linearGradient3406"
+ xlink:href="#linearGradient3366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.6315243,0,0,-0.7075182,-226.40365,274.91611)" />
+ <linearGradient
+ x1="-147.2406"
+ y1="180.95567"
+ x2="-140.01878"
+ y2="175.57777"
+ id="linearGradient3402"
+ xlink:href="#linearGradient3366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.6315243,0,0,-0.7075182,-64.045217,275.07466)" />
+ <linearGradient
+ x1="-146.98956"
+ y1="174.00922"
+ x2="-142.60332"
+ y2="179.38712"
+ id="linearGradient3398"
+ xlink:href="#linearGradient3366"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.6315243,0,0,0.7075182,-62.683611,54.187362)" />
+ <linearGradient
+ id="linearGradient3366">
+ <stop
+ id="stop3368"
+ style="stop-color:#bcbcbc;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3370"
+ style="stop-color:#191b1c;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="-208.95004"
+ cy="173.10576"
+ r="31.667252"
+ fx="-208.95004"
+ fy="173.10576"
+ id="radialGradient3364"
+ xlink:href="#linearGradient3366"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <g
+ id="layer1">
+ <g
+ transform="translate(419.4996,488.13454)"
+ id="mine">
+ <path
+ d="M -167.5843,186.54079 A 31.466251,31.466251 0 1 1 -230.5168,186.54079 A 31.466251,31.466251 0 1 1 -167.5843,186.54079 z"
+ transform="matrix(0.6341613,0,0,0.6341613,-18.521242,45.718192)"
+ id="path2586"
+ style="opacity:1;fill:url(#radialGradient3364);fill-opacity:1;stroke:#131313;stroke-width:3.54799318;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M -155.20193,175.4167 C -157.60085,176.6451 -156.78074,184.26068 -156.78074,184.26068 C -156.78074,184.26068 -148.33787,181.58301 -148.57092,178.60053 C -148.74283,176.40051 -153.23774,174.41092 -155.20193,175.4167 z"
+ id="path3382"
+ style="fill:url(#linearGradient3398);fill-opacity:1;fill-rule:evenodd;stroke:#131313;stroke-width:2.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M -156.56354,153.84532 C -158.96246,152.61693 -158.14235,145.00135 -158.14235,145.00135 C -158.14235,145.00135 -149.69948,147.67902 -149.93253,150.66149 C -150.10444,152.86151 -154.59935,154.85111 -156.56354,153.84532 z"
+ id="path3400"
+ style="fill:url(#linearGradient3402);fill-opacity:1;fill-rule:evenodd;stroke:#131313;stroke-width:2.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M -133.88532,153.68678 C -131.48641,152.45838 -132.30652,144.8428 -132.30652,144.8428 C -132.30652,144.8428 -140.74938,147.52047 -140.51633,150.50295 C -140.34442,152.70297 -135.84951,154.69256 -133.88532,153.68678 z"
+ id="path3404"
+ style="fill:url(#linearGradient3406);fill-opacity:1;fill-rule:evenodd;stroke:#131313;stroke-width:2.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M -134.51948,175.55085 C -132.12057,176.77925 -132.94068,184.39483 -132.94068,184.39483 C -132.94068,184.39483 -141.38355,181.71716 -141.15049,178.73469 C -140.97858,176.53467 -136.48367,174.54507 -134.51948,175.55085 z"
+ id="path3408"
+ style="fill:url(#linearGradient3410);fill-opacity:1;fill-rule:evenodd;stroke:#131313;stroke-width:2.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M -161.25709,168.78221 C -163.22395,170.62484 -170.11427,165.85236 -170.11427,165.85236 C -170.11427,165.85236 -164.7408,160.23808 -162.01257,161.46538 C -160.00011,162.37068 -159.64667,167.27352 -161.25709,168.78221 z"
+ id="path3412"
+ style="fill:url(#linearGradient3414);fill-opacity:1;fill-rule:evenodd;stroke:#131313;stroke-width:2.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M -129.17068,169.10464 C -127.20382,170.94727 -120.3135,166.17478 -120.3135,166.17478 C -120.3135,166.17478 -125.68697,160.5605 -128.41519,161.7878 C -130.42766,162.69311 -130.7811,167.59595 -129.17068,169.10464 z"
+ id="path3416"
+ style="fill:url(#linearGradient3418);fill-opacity:1;fill-rule:evenodd;stroke:#131313;stroke-width:2.25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M -126,151.21948 A 6.625,6.625 0 1 1 -139.25,151.21948 A 6.625,6.625 0 1 1 -126,151.21948 z"
+ transform="matrix(0.6341613,0,0,0.6341613,-61.039517,68.324922)"
+ id="path3426"
+ style="opacity:1;fill:url(#radialGradient3439);fill-opacity:1;stroke:#131313;stroke-width:3.54799318;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+ </g>
+</svg>
diff --git a/examples/widgets/animation/sub-attaq/pics/scalable/sand.svg b/examples/widgets/animation/sub-attaq/pics/scalable/sand.svg
new file mode 100644
index 0000000000..8af11b7a66
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/scalable/sand.svg
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.0"
+ width="744.09448"
+ height="1052.3622"
+ id="svg2596">
+ <defs
+ id="defs2598">
+ <linearGradient
+ id="linearGradient3708">
+ <stop
+ id="stop3710"
+ style="stop-color:#202020;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3712"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="518.26996"
+ y1="497.31476"
+ x2="533.02924"
+ y2="497.31476"
+ id="linearGradient3794"
+ xlink:href="#linearGradient3708"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ id="linearGradient3718">
+ <stop
+ id="stop3720"
+ style="stop-color:#bcbcbc;stop-opacity:0.28169015"
+ offset="0" />
+ <stop
+ id="stop3722"
+ style="stop-color:#bcbcbc;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="516.89508"
+ y1="503.50137"
+ x2="516.89508"
+ y2="543.80646"
+ id="linearGradient3792"
+ xlink:href="#linearGradient3718"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.9947644,0,0,1.3346457,2.7877039,-166.60153)" />
+ <linearGradient
+ id="linearGradient3692">
+ <stop
+ id="stop3694"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3696"
+ style="stop-color:#b6b6b6;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="506.95975"
+ y1="469.73706"
+ x2="525.41608"
+ y2="469.73706"
+ id="linearGradient3790"
+ xlink:href="#linearGradient3692"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ id="linearGradient3816">
+ <stop
+ id="stop3818"
+ style="stop-color:#ad8b00;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3820"
+ style="stop-color:#ad8b00;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="573"
+ y1="755.46222"
+ x2="573"
+ y2="700.13464"
+ id="linearGradient3826"
+ xlink:href="#linearGradient3816"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.6033628,-150.63569,-350.3846)" />
+ </defs>
+ <g
+ id="layer1">
+ <path
+ d="M -151.63569,813.2217 C 121.3643,798.79144 -201.99878,675.6877 110.3643,805.79144 C 173.82677,832.22448 244.3643,807.3948 298.3643,805.79144 C 352.3643,804.18808 312.3643,791.12082 359.3643,811.96454 C 406.3643,832.80825 554.3643,792.77462 599.3643,784.75781 C 644.3643,776.741 757.36426,768.13763 796.36426,782.5679 C 835.36426,796.99816 905.36426,799.37799 905.36426,799.37799 L 902.36426,847.47887 L -153.63569,845.87551 L -151.63569,813.2217 z"
+ id="path3814"
+ style="fill:url(#linearGradient3826);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ <path
+ d="M 908.86426,836.95812 C 635.8643,830.91791 761.87636,793.71076 617.8643,836.91791 C 600.0648,842.2582 409.74894,822.981 401.8643,836.91791 C 378.04825,879.01524 73.306465,803.72304 31.864305,827.54883 C 28.864305,829.27358 9.9016246,824.26916 -15.135695,831.28771 C -51.805335,841.56707 -68.135695,826.06042 -107.1357,832.10063 C -146.1357,838.14084 -150.13569,834.11404 -150.13569,834.11404 L -157.13569,848.36741 L 898.86426,847.69627 L 908.86426,836.95812 z"
+ id="path3828"
+ style="fill:#ad8b00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+</svg>
diff --git a/examples/widgets/animation/sub-attaq/pics/scalable/see.svg b/examples/widgets/animation/sub-attaq/pics/scalable/see.svg
new file mode 100644
index 0000000000..0666691215
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/scalable/see.svg
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.0"
+ width="744.09448"
+ height="1052.3622"
+ id="svg2650">
+ <defs
+ id="defs2652">
+ <linearGradient
+ id="linearGradient3624">
+ <stop
+ id="stop3626"
+ style="stop-color:#3a8daf;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3636"
+ style="stop-color:#252525;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="552.98486"
+ y1="390.56842"
+ x2="549.39465"
+ y2="702.3479"
+ id="linearGradient3630"
+ xlink:href="#linearGradient3624"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.3373776,0,0,1.5004634,-996.17287,-279.00679)" />
+ </defs>
+ <g
+ id="layer1">
+ <rect
+ width="1054.4708"
+ height="461.52972"
+ x="-161.52115"
+ y="310.16876"
+ id="rect3622"
+ style="opacity:1;fill:url(#linearGradient3630);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4.13464069;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+</svg>
diff --git a/examples/widgets/animation/sub-attaq/pics/scalable/sky.svg b/examples/widgets/animation/sub-attaq/pics/scalable/sky.svg
new file mode 100644
index 0000000000..1546c087a7
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/scalable/sky.svg
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.0"
+ width="744.09448"
+ height="1052.3622"
+ id="svg2721">
+ <defs
+ id="defs2723">
+ <linearGradient
+ id="linearGradient3746">
+ <stop
+ id="stop3748"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop3750"
+ style="stop-color:#0074b7;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="82.966125"
+ cy="-178.42453"
+ r="526.79456"
+ fx="82.966125"
+ fy="-178.42453"
+ id="radialGradient3880"
+ xlink:href="#linearGradient3746"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.4952094,0.3367191,-0.1040669,0.5264617,-235.04839,425.12197)" />
+ </defs>
+ <g
+ id="layer1">
+ <rect
+ width="1053.5891"
+ height="291.32797"
+ x="-178.22313"
+ y="300.98392"
+ id="rect3638"
+ style="opacity:1;fill:url(#radialGradient3880);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4.1880002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+</svg>
diff --git a/examples/widgets/animation/sub-attaq/pics/scalable/sub-attaq.svg b/examples/widgets/animation/sub-attaq/pics/scalable/sub-attaq.svg
new file mode 100644
index 0000000000..b075179b46
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/pics/scalable/sub-attaq.svg
@@ -0,0 +1,1473 @@
+<?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="1052.3622"
+ height="744.09448"
+ id="svg2"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ version="1.0"
+ sodipodi:docname="sub-attaq.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape">
+ <defs
+ id="defs4">
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3366"
+ id="radialGradient3439"
+ cx="-135.625"
+ cy="148.71948"
+ fx="-135.625"
+ fy="148.71948"
+ r="7.625"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3366"
+ id="linearGradient3418"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.2134297,-0.5943658,0.6658882,-0.2391126,-274.53441,123.00067)"
+ x1="-132.85063"
+ y1="173.6969"
+ x2="-145.3662"
+ y2="177.59828" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3366"
+ id="linearGradient3414"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.2134297,-0.5943658,-0.6658882,-0.2391126,-15.893355,122.67824)"
+ x1="-141.85466"
+ y1="181.49153"
+ x2="-144.95044"
+ y2="175.90179" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3366"
+ id="linearGradient3410"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.6315243,0,0,0.7075182,-227.03781,54.321514)"
+ x1="-149.5"
+ y1="177.59448"
+ x2="-145.7928"
+ y2="180.05936" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3366"
+ id="linearGradient3406"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.6315243,0,0,-0.7075182,-226.40365,274.91611)"
+ x1="-140.46242"
+ y1="177.40488"
+ x2="-147.04802"
+ y2="172.66473" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3366"
+ id="linearGradient3402"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.6315243,0,0,-0.7075182,-64.045217,275.07466)"
+ x1="-147.2406"
+ y1="180.95567"
+ x2="-140.01878"
+ y2="175.57777" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3366"
+ id="linearGradient3398"
+ x1="-146.98956"
+ y1="174.00922"
+ x2="-142.60332"
+ y2="179.38712"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.6315243,0,0,0.7075182,-62.683611,54.187362)" />
+ <linearGradient
+ id="linearGradient3366">
+ <stop
+ id="stop3368"
+ offset="0"
+ style="stop-color:#bcbcbc;stop-opacity:1;" />
+ <stop
+ id="stop3370"
+ offset="1"
+ style="stop-color:#191b1c;stop-opacity:1;" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3366"
+ id="radialGradient3364"
+ cx="-208.95004"
+ cy="173.10576"
+ fx="-208.95004"
+ fy="173.10576"
+ r="31.667252"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ id="linearGradient5097">
+ <stop
+ style="stop-color:#19a2db;stop-opacity:0;"
+ offset="0"
+ id="stop5099" />
+ <stop
+ id="stop5109"
+ offset="0.30000001"
+ style="stop-color:#1379a7;stop-opacity:0.49803922;" />
+ <stop
+ style="stop-color:#0e5173;stop-opacity:1;"
+ offset="1"
+ id="stop5101" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3523"
+ inkscape:collect="always">
+ <stop
+ id="stop3525"
+ offset="0"
+ style="stop-color:#b9b9b9;stop-opacity:1" />
+ <stop
+ id="stop3527"
+ offset="1"
+ style="stop-color:#444444;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3438">
+ <stop
+ style="stop-color:#939393;stop-opacity:1;"
+ offset="0"
+ id="stop3440" />
+ <stop
+ id="stop3444"
+ offset="0.12354442"
+ style="stop-color:#d6d6d6;stop-opacity:1;" />
+ <stop
+ style="stop-color:#dadada;stop-opacity:1;"
+ offset="0.74055624"
+ id="stop3446" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3442" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3428">
+ <stop
+ id="stop3430"
+ offset="0"
+ style="stop-color:#464646;stop-opacity:1;" />
+ <stop
+ style="stop-color:#848788;stop-opacity:1;"
+ offset="0.18306103"
+ id="stop3432" />
+ <stop
+ id="stop3434"
+ offset="0.66368055"
+ style="stop-color:#9ca0a2;stop-opacity:1;" />
+ <stop
+ id="stop3436"
+ offset="1"
+ style="stop-color:#b5babd;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4034">
+ <stop
+ id="stop4036"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.49803922;"
+ offset="0.5"
+ id="stop4038" />
+ <stop
+ id="stop4040"
+ offset="0.63705367"
+ style="stop-color:#ffffff;stop-opacity:0.24705882;" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.12156863;"
+ offset="0.79425853"
+ id="stop4042" />
+ <stop
+ id="stop4044"
+ offset="1"
+ style="stop-color:#a0a0a0;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4016">
+ <stop
+ style="stop-color:#283e6a;stop-opacity:1;"
+ offset="0"
+ id="stop4018" />
+ <stop
+ style="stop-color:#283e6a;stop-opacity:0;"
+ offset="1"
+ id="stop4020" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4004">
+ <stop
+ style="stop-color:#dbdbdb;stop-opacity:1;"
+ offset="0"
+ id="stop4010" />
+ <stop
+ style="stop-color:#c4c9cb;stop-opacity:1;"
+ offset="1"
+ id="stop4012" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3998">
+ <stop
+ id="stop4000"
+ offset="0"
+ style="stop-color:#adadad;stop-opacity:1;" />
+ <stop
+ id="stop4002"
+ offset="1"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3864">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3866" />
+ <stop
+ id="stop4028"
+ offset="0.5"
+ style="stop-color:#ffffff;stop-opacity:0.49803922;" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0.24705882;"
+ offset="0.75"
+ id="stop4030" />
+ <stop
+ id="stop4032"
+ offset="0.875"
+ style="stop-color:#ffffff;stop-opacity:0.12156863;" />
+ <stop
+ style="stop-color:#a0a0a0;stop-opacity:1;"
+ offset="1"
+ id="stop3868" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient3816">
+ <stop
+ style="stop-color:#ad8b00;stop-opacity:1;"
+ offset="0"
+ id="stop3818" />
+ <stop
+ style="stop-color:#ad8b00;stop-opacity:0;"
+ offset="1"
+ id="stop3820" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3746">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3748" />
+ <stop
+ style="stop-color:#0074b7;stop-opacity:1;"
+ offset="1"
+ id="stop3750" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3718">
+ <stop
+ style="stop-color:#bcbcbc;stop-opacity:0.28169015;"
+ offset="0"
+ id="stop3720" />
+ <stop
+ style="stop-color:#bcbcbc;stop-opacity:0;"
+ offset="1"
+ id="stop3722" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3708">
+ <stop
+ style="stop-color:#202020;stop-opacity:1;"
+ offset="0"
+ id="stop3710" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="1"
+ id="stop3712" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3692">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3694" />
+ <stop
+ style="stop-color:#b6b6b6;stop-opacity:1;"
+ offset="1"
+ id="stop3696" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3656">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3658" />
+ <stop
+ style="stop-color:#ffffff;stop-opacity:0;"
+ offset="1"
+ id="stop3660" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3624">
+ <stop
+ style="stop-color:#3a8daf;stop-opacity:1;"
+ offset="0"
+ id="stop3626" />
+ <stop
+ id="stop3636"
+ offset="1"
+ style="stop-color:#252525;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3532">
+ <stop
+ id="stop3534"
+ offset="0"
+ style="stop-color:#545454;stop-opacity:1;" />
+ <stop
+ style="stop-color:#848788;stop-opacity:1;"
+ offset="0.44021741"
+ id="stop3536" />
+ <stop
+ id="stop3538"
+ offset="0.56799388"
+ style="stop-color:#9ca0a2;stop-opacity:1;" />
+ <stop
+ id="stop3540"
+ offset="1"
+ style="stop-color:#565d60;stop-opacity:1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3345">
+ <stop
+ id="stop3348"
+ offset="0"
+ style="stop-color:#898989;stop-opacity:1;" />
+ <stop
+ style="stop-color:#9ea1a2;stop-opacity:1;"
+ offset="0.44021741"
+ id="stop3350" />
+ <stop
+ id="stop3352"
+ offset="0.56799388"
+ style="stop-color:#bbbdbf;stop-opacity:1;" />
+ <stop
+ id="stop3354"
+ offset="1"
+ style="stop-color:#f0f1f2;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3227">
+ <stop
+ style="stop-color:#444444;stop-opacity:1;"
+ offset="0"
+ id="stop3229" />
+ <stop
+ style="stop-color:#b0b0b0;stop-opacity:1;"
+ offset="1"
+ id="stop3232" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3435">
+ <stop
+ style="stop-color:#ffffff;stop-opacity:1;"
+ offset="0"
+ id="stop3437" />
+ <stop
+ style="stop-color:#c0c0c0;stop-opacity:0;"
+ offset="1"
+ id="stop3439" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient3421">
+ <stop
+ style="stop-color:#444444;stop-opacity:1;"
+ offset="0"
+ id="stop3423" />
+ <stop
+ style="stop-color:#444444;stop-opacity:0;"
+ offset="1"
+ id="stop3425" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3293">
+ <stop
+ style="stop-color:#c4b434;stop-opacity:1;"
+ offset="0"
+ id="stop3295" />
+ <stop
+ style="stop-color:#9b5500;stop-opacity:1;"
+ offset="1"
+ id="stop3297" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3229">
+ <stop
+ style="stop-color:#125a7a;stop-opacity:1;"
+ offset="0"
+ id="stop3231" />
+ <stop
+ style="stop-color:#308fc0;stop-opacity:1;"
+ offset="1"
+ id="stop3233" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3219">
+ <stop
+ id="stop3221"
+ offset="0"
+ style="stop-color:#a55b00;stop-opacity:1;" />
+ <stop
+ id="stop3223"
+ offset="1"
+ style="stop-color:#f4e45e;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3189">
+ <stop
+ style="stop-color:#000000;stop-opacity:1;"
+ offset="0"
+ id="stop3191" />
+ <stop
+ style="stop-color:#000000;stop-opacity:0;"
+ offset="1"
+ id="stop3193" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3167">
+ <stop
+ style="stop-color:#464646;stop-opacity:1;"
+ offset="0"
+ id="stop3169" />
+ <stop
+ id="stop3345"
+ offset="0.44021741"
+ style="stop-color:#848788;stop-opacity:1;" />
+ <stop
+ style="stop-color:#9ca0a2;stop-opacity:1;"
+ offset="0.56799388"
+ id="stop3347" />
+ <stop
+ style="stop-color:#b5babd;stop-opacity:1;"
+ offset="1"
+ id="stop3171" />
+ </linearGradient>
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective10" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3167"
+ id="linearGradient3175"
+ x1="443.95602"
+ y1="315.31854"
+ x2="443.95602"
+ y2="247.85609"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.4908502,0,0,0.4579593,350.98557,542.12189)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3219"
+ id="linearGradient3253"
+ gradientUnits="userSpaceOnUse"
+ x1="325.57214"
+ y1="280.13632"
+ x2="312.84424"
+ y2="257.60013" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3229"
+ id="linearGradient3255"
+ gradientUnits="userSpaceOnUse"
+ x1="310.01578"
+ y1="255.47881"
+ x2="325.92572"
+ y2="280.13632" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3219"
+ id="linearGradient3321"
+ gradientUnits="userSpaceOnUse"
+ x1="325.57214"
+ y1="280.13632"
+ x2="312.84424"
+ y2="257.60013" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3229"
+ id="linearGradient3323"
+ gradientUnits="userSpaceOnUse"
+ x1="310.01578"
+ y1="255.47881"
+ x2="325.92572"
+ y2="280.13632" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3219"
+ id="linearGradient3331"
+ gradientUnits="userSpaceOnUse"
+ x1="325.57214"
+ y1="280.13632"
+ x2="312.84424"
+ y2="257.60013" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3229"
+ id="linearGradient3333"
+ gradientUnits="userSpaceOnUse"
+ x1="310.01578"
+ y1="255.47881"
+ x2="325.92572"
+ y2="280.13632" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3293"
+ id="linearGradient3343"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.3292883,0,0,1.10796,1.5038593,-24.232315)"
+ x1="359.5589"
+ y1="258.84247"
+ x2="370.88239"
+ y2="258.84247" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3219"
+ id="linearGradient3365"
+ gradientUnits="userSpaceOnUse"
+ x1="325.57214"
+ y1="280.13632"
+ x2="312.84424"
+ y2="257.60013" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3229"
+ id="linearGradient3367"
+ gradientUnits="userSpaceOnUse"
+ x1="310.01578"
+ y1="255.47881"
+ x2="325.92572"
+ y2="280.13632" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3219"
+ id="linearGradient3369"
+ gradientUnits="userSpaceOnUse"
+ x1="325.57214"
+ y1="280.13632"
+ x2="312.84424"
+ y2="257.60013" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3229"
+ id="linearGradient3371"
+ gradientUnits="userSpaceOnUse"
+ x1="310.01578"
+ y1="255.47881"
+ x2="325.92572"
+ y2="280.13632" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3219"
+ id="linearGradient3379"
+ gradientUnits="userSpaceOnUse"
+ x1="325.57214"
+ y1="280.13632"
+ x2="312.84424"
+ y2="257.60013" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3229"
+ id="linearGradient3381"
+ gradientUnits="userSpaceOnUse"
+ x1="310.01578"
+ y1="255.47881"
+ x2="325.92572"
+ y2="280.13632" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3293"
+ id="linearGradient3385"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.3267302,0,0,1.1332782,-1.5786343,-29.194748)"
+ x1="371.79858"
+ y1="258.84247"
+ x2="364.49646"
+ y2="258.84247" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3293"
+ id="linearGradient3401"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.9807835,0,0,1.1280701,-361.45126,-28.553769)"
+ x1="371.79858"
+ y1="258.84247"
+ x2="364.49646"
+ y2="258.84247" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3421"
+ id="radialGradient3431"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.1862613,0,0,0.3638703,-186.86143,179.02055)"
+ cx="432.3343"
+ cy="233.80295"
+ fx="432.3343"
+ fy="233.80295"
+ r="59.056834" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3435"
+ id="radialGradient3441"
+ cx="290.5"
+ cy="244.34448"
+ fx="290.5"
+ fy="244.34448"
+ r="37.5"
+ gradientTransform="matrix(0.8202102,0.8202102,-0.7960458,0.7960458,246.73838,-189.686)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3345"
+ id="linearGradient3311"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.466978,0,0,0.4500435,352.00841,540.25044)"
+ x1="510.99884"
+ y1="161.99408"
+ x2="396.48914"
+ y2="161.99408" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3421"
+ id="radialGradient3339"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.4181493,0,0,0.1282619,386.09461,620.15777)"
+ cx="432.3343"
+ cy="233.80295"
+ fx="432.3343"
+ fy="233.80295"
+ r="59.056834" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3219"
+ id="linearGradient3434"
+ gradientUnits="userSpaceOnUse"
+ x1="325.57214"
+ y1="280.13632"
+ x2="312.84424"
+ y2="257.60013" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3229"
+ id="linearGradient3436"
+ gradientUnits="userSpaceOnUse"
+ x1="310.01578"
+ y1="255.47881"
+ x2="325.92572"
+ y2="280.13632" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3532"
+ id="linearGradient3520"
+ x1="525"
+ y1="371.09448"
+ x2="525"
+ y2="395.09448"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.5865192,0,0,0.2518015,339.73218,572.99479)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3624"
+ id="linearGradient3630"
+ x1="552.98486"
+ y1="390.56842"
+ x2="549.39465"
+ y2="702.3479"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.3373776,0,0,1.5004634,-835.38716,-310.82676)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3656"
+ id="radialGradient3662"
+ cx="656.19507"
+ cy="534.45917"
+ fx="656.19507"
+ fy="534.45917"
+ r="13.227922"
+ gradientTransform="matrix(1,0,0,1.2672781,0,-144.63884)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3656"
+ id="radialGradient3668"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2672781,0,-144.63884)"
+ cx="656.19507"
+ cy="534.45917"
+ fx="656.19507"
+ fy="534.45917"
+ r="13.227922" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3656"
+ id="radialGradient3672"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2672781,0,-144.63884)"
+ cx="656.19507"
+ cy="534.45917"
+ fx="656.19507"
+ fy="534.45917"
+ r="13.227922" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3656"
+ id="radialGradient3676"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2672781,0,-144.63884)"
+ cx="656.19507"
+ cy="534.45917"
+ fx="656.19507"
+ fy="534.45917"
+ r="13.227922" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3692"
+ id="linearGradient3772"
+ gradientUnits="userSpaceOnUse"
+ x1="506.95975"
+ y1="469.73706"
+ x2="525.41608"
+ y2="469.73706" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3718"
+ id="linearGradient3774"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.9947644,0,0,1.3346457,2.7877039,-166.60153)"
+ x1="516.89508"
+ y1="503.50137"
+ x2="516.89508"
+ y2="543.80646" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3708"
+ id="linearGradient3776"
+ gradientUnits="userSpaceOnUse"
+ x1="518.26993"
+ y1="497.31477"
+ x2="533.02923"
+ y2="497.31477" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3692"
+ id="linearGradient3790"
+ gradientUnits="userSpaceOnUse"
+ x1="506.95975"
+ y1="469.73706"
+ x2="525.41608"
+ y2="469.73706" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3718"
+ id="linearGradient3792"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.9947644,0,0,1.3346457,2.7877039,-166.60153)"
+ x1="516.89508"
+ y1="503.50137"
+ x2="516.89508"
+ y2="543.80646" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3708"
+ id="linearGradient3794"
+ gradientUnits="userSpaceOnUse"
+ x1="518.26993"
+ y1="497.31477"
+ x2="533.02923"
+ y2="497.31477" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3656"
+ id="radialGradient3804"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2672781,0,-144.63884)"
+ cx="656.19507"
+ cy="534.45917"
+ fx="656.19507"
+ fy="534.45917"
+ r="13.227922" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3656"
+ id="radialGradient3808"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.2672781,0,-144.63884)"
+ cx="656.19507"
+ cy="534.45917"
+ fx="656.19507"
+ fy="534.45917"
+ r="13.227922" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3227"
+ id="linearGradient3812"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.1223608,0,0,0.3849769,-17.516054,565.40983)"
+ x1="543.5"
+ y1="205.19257"
+ x2="587.52001"
+ y2="205.19257" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3816"
+ id="linearGradient3826"
+ x1="573"
+ y1="755.46222"
+ x2="573"
+ y2="700.13464"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,1.6033628,0,-450.76899)" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3864"
+ id="radialGradient3874"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.9674693,0.8647541,-0.8726553,1.0212484,-15.308759,-74.232772)"
+ cx="94.273849"
+ cy="89.893486"
+ fx="94.273849"
+ fy="89.893486"
+ r="74.397521" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3746"
+ id="radialGradient3880"
+ cx="82.966125"
+ cy="-178.42453"
+ fx="82.966125"
+ fy="-178.42453"
+ r="526.79456"
+ gradientTransform="matrix(1.4952094,0.3367191,-0.1040669,0.5264617,-57.119818,125.77043)"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3438"
+ id="linearGradient3948"
+ x1="660.29303"
+ y1="256.53284"
+ x2="444.79303"
+ y2="255.62085"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0,32.526912)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3692"
+ id="linearGradient3972"
+ x1="573.5"
+ y1="244.2056"
+ x2="578.25"
+ y2="216.9556"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0,35.526912)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3746"
+ id="linearGradient3990"
+ x1="542.5"
+ y1="222.59448"
+ x2="559"
+ y2="222.59448"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-6.25,37.151912)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3746"
+ id="linearGradient3994"
+ gradientUnits="userSpaceOnUse"
+ x1="542.5"
+ y1="222.59448"
+ x2="559"
+ y2="222.59448"
+ gradientTransform="translate(38.5,37.151912)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4016"
+ id="linearGradient4022"
+ x1="639"
+ y1="262.09448"
+ x2="667"
+ y2="262.09448"
+ gradientUnits="userSpaceOnUse" />
+ <inkscape:perspective
+ id="perspective2578"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3746"
+ id="linearGradient3387"
+ gradientUnits="userSpaceOnUse"
+ x1="542.5"
+ y1="222.59448"
+ x2="559"
+ y2="222.59448"
+ gradientTransform="translate(15.875,37.151912)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3167"
+ id="linearGradient3416"
+ x1="474.23065"
+ y1="229.92336"
+ x2="474.1944"
+ y2="218.27365"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(0.1004684,32.526757)" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3428"
+ id="linearGradient3426"
+ x1="592.92798"
+ y1="199.43727"
+ x2="557.05743"
+ y2="196.5448"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(12.140805,-13.041887)" />
+ <filter
+ inkscape:collect="always"
+ id="filter3507">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="3.0523171"
+ id="feGaussianBlur3509" />
+ </filter>
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3523"
+ id="linearGradient3521"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1,0,0,-0.7291751,0,521.83983)"
+ x1="562.55634"
+ y1="285.89896"
+ x2="562.55634"
+ y2="244.09448" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient5097"
+ id="linearGradient5103"
+ x1="590.84674"
+ y1="274.57559"
+ x2="590.84674"
+ y2="334.01376"
+ gradientUnits="userSpaceOnUse"
+ spreadMethod="pad" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3864"
+ id="radialGradient5107"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2.9674693,0.8647541,-0.8726553,1.0212484,-15.308759,-74.232772)"
+ cx="94.273849"
+ cy="89.893486"
+ fx="94.273849"
+ fy="89.893486"
+ r="74.397521" />
+ </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.70710678"
+ inkscape:cx="532.91407"
+ inkscape:cy="457.84365"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1674"
+ inkscape:window-height="1000"
+ inkscape:window-x="2"
+ inkscape:window-y="14"
+ showguides="false" />
+ <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">
+ <rect
+ style="opacity:1;fill:url(#radialGradient3880);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4.1880002;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect3638"
+ width="1053.5891"
+ height="291.32797"
+ x="-0.29455566"
+ y="1.6323624" />
+ <path
+ style="fill:url(#radialGradient3874);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3507)"
+ d="M 158.37853,75.817898 C 130.95894,49.483192 82.14552,74.615971 85.85382,95.15981 C 49.691853,94.8009 50.214842,139.36083 83.29101,132.16343 C 144.66465,163.16454 159.26268,129.80212 164.6863,136.51386 C 225.60448,157.97672 246.34362,130.65438 265.24417,127.0714 C 294.43981,137.91859 337.16986,121.78798 297.03636,102.77604 C 331.73096,64.597047 277.96882,60.229366 253.07028,70.400868 C 191.09597,33.610112 168.89234,63.292037 158.37853,75.817898 z"
+ id="path3872"
+ sodipodi:nodetypes="cccccccc"
+ transform="matrix(1.5062893,0,0,1.1720951,618.04001,132.36768)" />
+ <rect
+ style="opacity:1;fill:url(#linearGradient3630);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4.13464069;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect3622"
+ width="1054.4708"
+ height="461.52972"
+ x="-0.7354126"
+ y="278.34879" />
+ <path
+ style="fill:url(#linearGradient3826);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M -0.99999999,712.83731 C 272,698.40705 -51.363087,575.30331 261,705.40705 C 324.46247,731.84009 395,707.01041 449,705.40705 C 503,703.80369 463,690.73643 510,711.58015 C 557,732.42386 705,692.39023 750,684.37342 C 795,676.35661 908,667.75324 947,682.18351 C 986,696.61377 1056,698.9936 1056,698.9936 L 1053,747.09448 L -3,745.49112 L -0.99999999,712.83731 z"
+ id="path3814"
+ sodipodi:nodetypes="cssssscccc" />
+ <rect
+ style="opacity:1;fill:url(#linearGradient3520);fill-opacity:1;fill-rule:nonzero;stroke:#1b1e1f;stroke-width:0.56879884;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect3512"
+ width="10.557344"
+ height="6.0432386"
+ x="642.3761"
+ y="666.43695" />
+ <use
+ x="0"
+ y="0"
+ xlink:href="#path2455"
+ id="use3258"
+ transform="matrix(0.869168,0,0,-0.869168,81.98751,1246.5374)"
+ width="1052.3622"
+ height="744.09448" />
+ <path
+ style="fill:url(#linearGradient3812);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.77744257;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 593.04822,651.68104 C 593.04822,651.68104 653.65569,615.49321 639.065,637.05192 C 624.47431,658.61061 624.47431,658.61061 624.47431,658.61061 L 593.04822,651.68104 z"
+ id="path2455" />
+ <path
+ style="fill:url(#linearGradient3175);fill-opacity:1;fill-rule:evenodd;stroke:#393939;stroke-width:1.90693891;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 485.26939,643.71814 C 443.15507,651.66437 458.5319,680.53556 502.21486,686.27814 C 551.68229,692.78115 568.45042,691.0115 605.34827,686.27814 C 657.60843,679.57406 657.68143,651.78445 605.34827,643.25553 C 553.98131,634.88408 516.10913,637.89923 485.26939,643.71814 z"
+ id="path2385"
+ sodipodi:nodetypes="cssss" />
+ <path
+ style="fill:url(#radialGradient3339);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 542.18031,648.1112 C 548.56327,665.42741 608.42397,656.72745 586.93551,642.57104 C 586.93551,642.57104 543.33293,648.61096 542.18031,648.1112 z"
+ id="path3403"
+ sodipodi:nodetypes="ccc" />
+ <path
+ style="fill:url(#linearGradient3311);fill-opacity:1;fill-rule:evenodd;stroke:#2d2d2d;stroke-width:2.07042313;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 537.39402,641.90906 C 537.39402,656.7605 583.62247,656.30589 583.62247,641.45445 L 583.62247,636.06071 C 583.62247,621.21003 537.39402,613.87461 537.39402,628.72529 L 537.39402,641.90906 z"
+ id="path3291"
+ sodipodi:nodetypes="cssss" />
+ <g
+ id="g3235"
+ transform="matrix(1.4016868,0,0,1.1319742,112.22001,-99.678822)" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:url(#radialGradient3441);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.227;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path3433"
+ sodipodi:cx="303.5"
+ sodipodi:cy="263.09448"
+ sodipodi:rx="37.5"
+ sodipodi:ry="40"
+ d="M 341,263.09448 A 37.5,40 0 1 1 266,263.09448 A 37.5,40 0 1 1 341,263.09448 z"
+ transform="matrix(0.692163,0,1.4106583e-2,0.289185,275.31394,582.37251)" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:#444444;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.06500006;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path3458"
+ sodipodi:cx="369.5"
+ sodipodi:cy="316.09448"
+ sodipodi:rx="27.5"
+ sodipodi:ry="7"
+ d="M 397,316.09448 A 27.5,7 0 1 1 342,316.09448 A 27.5,7 0 1 1 397,316.09448 z"
+ transform="matrix(0.5642633,0,0,0.5642633,348.03095,450.47113)" />
+ <path
+ sodipodi:type="arc"
+ style="opacity:1;fill:#444444;fill-opacity:1;fill-rule:nonzero;stroke:#1b1e1f;stroke-width:4.23126984;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path3510"
+ sodipodi:cx="369.5"
+ sodipodi:cy="316.09448"
+ sodipodi:rx="27.5"
+ sodipodi:ry="7"
+ d="M 397,316.09448 A 27.5,7 0 1 1 342,316.09448 A 27.5,7 0 1 1 397,316.09448 z"
+ transform="matrix(0,0.30778,-0.5642633,0,828.66499,563.5944)" />
+ <use
+ x="0"
+ y="0"
+ xlink:href="#path3510"
+ id="use3544"
+ transform="translate(0.5000005,-17.23511)"
+ width="1052.3622"
+ height="7