summaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
...
* | Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c,Victor Stinner2011-05-092-0/+4
* | Some more tests were incorrectly marked as C specific.Ezio Melotti2011-05-091-12/+10
* | Stop trying to use _xmlplus in the xml module. Closes #11164.Martin v. Löwis2011-05-099-105/+10
* | #11910: Fix test_heapq to skip the C tests when _heapq is missing.Ezio Melotti2011-05-092-20/+29
* | #11910: change import_fresh_module to return None when one of the "fresh" mod...Ezio Melotti2011-05-091-4/+8
* | Add a note to the str.find doc to suggest the use of the "in" operator.Ezio Melotti2011-05-091-0/+9
* | put import_fresh_module in __all__Benjamin Peterson2011-05-081-0/+1
* | Add back Misc/NEWS entry that got lost during merge, and fix a couple of othe...Ezio Melotti2011-05-081-3/+5
* | MergeAntoine Pitrou2011-05-072-1/+10
|\ \
| * \ mergeGiampaolo Rodola'2011-05-072-1/+10
| |\ \
| | * | #12002 - ftplib's abort() method raises TypeErrorGiampaolo Rodola'2011-05-073-1/+12
* | | | Issue #11927: SMTP_SSL now uses port 465 by default as documented. Patch by ...Antoine Pitrou2011-05-074-2/+15
|/ / /
* | | #5421: add tests.Ezio Melotti2011-05-071-0/+30
* | | #12017: Fix segfault in json.loads() while decoding highly-nested objects usi...Ezio Melotti2011-05-073-2/+28
* | | Fix potential resource leak in test_mmap.Nadeem Vawda2011-05-071-0/+1
* | | Issue #11277: Fix tests - crash will not trigger if the file is closed and re...Nadeem Vawda2011-05-071-14/+12
* | | Issue #11277: Add tests for mmap crash when using large sparse files on OS X.Nadeem Vawda2011-05-071-26/+34
* | | #11999: sync based on comparing mtimes, not mtime to system clockR David Murray2011-05-073-49/+54
* | | Fix for issue 10684: Folders get deleted when trying to change case with shut...Ronald Oussoren2011-05-063-1/+29
* | | #11997: fix typo in init.rst.Ezio Melotti2011-05-051-1/+1
* | | #8158: add missing 'description' description to optparse docstring.R David Murray2011-05-051-0/+5
* | | #11985: update docstring of platform.python_implementation.Ezio Melotti2011-05-041-3/+4
* | | Fix #11834. Correct site-packages paths.Brian Curtin2011-05-041-1/+1
* | | #11985: document the return value of platform.python_implementation for PyPy.Ezio Melotti2011-05-031-1/+1
| |/ |/|
* | Branch mergeÉric Araujo2011-05-021-2/+2
|\ \
| * | Fix wordingÉric Araujo2011-05-011-2/+2
* | | Add missing colonÉric Araujo2011-05-021-1/+1
* | | Fix spelling.Raymond Hettinger2011-05-021-1/+1
* | | Issue #11277: mmap calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get around aVictor Stinner2011-05-014-1/+17
* | | note abcs of int and float (closes #11977)Benjamin Peterson2011-05-011-3/+7
* | | Issue #9756: credit the author, Andreas Stührk (Trundle)Victor Stinner2011-05-012-1/+2
* | | Issue #9756: When calling a method descriptor or a slot wrapper descriptor, theVictor Stinner2011-05-013-3/+27
* | | #11971: fix man page; it's -OO not -O0R David Murray2011-05-011-2/+2
* | | #11883: fix email examples by adding 'localhost' to SMTP constructor callsR David Murray2011-04-303-3/+3
* | | #11901: post-commit review fixes per Georg BrandlR David Murray2011-04-301-7/+7
* | | fix function name in example (closes #11966)Benjamin Peterson2011-04-301-1/+1
|/ /
* | whitespace...Brian Curtin2011-04-301-3/+3
* | Fix #11961. Document STARTUPINFO and creation flag options.Brian Curtin2011-04-301-3/+98
* | Wrap the testskip decorator for the proper test to resolve bb failure.Senthil Kumaran2011-04-291-1/+1
* | Further fix #7838. CREATE_NEW_CONSOLE was exposed, but none of theBrian Curtin2011-04-291-2/+9
* | #11952: Fix typo in multiprocessing doc.Ezio Melotti2011-04-291-1/+1
* | skip the extractall test on platforms where os.symlink is not available.Senthil Kumaran2011-04-281-0/+1
* | Add tests for tarfile extractall feature when with symlinksSenthil Kumaran2011-04-281-0/+27
* | #11926: add missing keywords to help("keywords").Ezio Melotti2011-04-283-38/+51
* | Issue #11940: Update external link.Raymond Hettinger2011-04-271-1/+1
* | #11942: Fix return type of Py_AddPendingCall. Patch by Sandro Tosi.Ezio Melotti2011-04-271-1/+1
* | Branch mergeÉric Araujo2011-04-2714-47/+63
|\ \
| * | Change markup so it generates a linkÉric Araujo2011-04-272-3/+3
| * | Change markup so that it creates a linkÉric Araujo2011-04-251-1/+1
| * | Remove obsolete/duplicate docstringÉric Araujo2011-04-241-5/+0
d.qml27
-rw-r--r--examples/declarative/aspectratio/pics/face.pngbin0 -> 15408 bytes-rw-r--r--examples/declarative/aspectratio/scale_and_crop.qml20
-rw-r--r--examples/declarative/aspectratio/scale_and_crop_simple.qml20
-rw-r--r--examples/declarative/aspectratio/scale_and_sidecrop.qml21
-rw-r--r--examples/declarative/aspectratio/scale_to_fit.qml21
-rw-r--r--examples/declarative/aspectratio/scale_to_fit_simple.qml20
-rw-r--r--examples/declarative/behaviours/MyRect.qml13
-rw-r--r--examples/declarative/behaviours/SideRect.qml17
-rw-r--r--examples/declarative/behaviours/behavior.qml72
-rw-r--r--examples/declarative/behaviours/test.qml100
-rw-r--r--examples/declarative/border-image/animated.qml55
-rw-r--r--examples/declarative/border-image/borders.qml18
-rw-r--r--examples/declarative/border-image/content/MyBorderImage.qml37
-rw-r--r--examples/declarative/border-image/content/bw.pngbin0 -> 1357 bytes-rw-r--r--examples/declarative/border-image/content/colors-round.sci7
-rw-r--r--examples/declarative/border-image/content/colors-stretch.sci5
-rw-r--r--examples/declarative/border-image/content/colors.pngbin0 -> 1655 bytes-rw-r--r--examples/declarative/clocks/clocks.qml15
-rw-r--r--examples/declarative/clocks/content/Clock.qml80
-rw-r--r--examples/declarative/clocks/content/background.pngbin0 -> 46895 bytes-rwxr-xr-xexamples/declarative/clocks/content/center.pngbin0 -> 765 bytes-rwxr-xr-xexamples/declarative/clocks/content/clock-night.pngbin0 -> 23359 bytes-rwxr-xr-xexamples/declarative/clocks/content/clock.pngbin0 -> 20653 bytes-rwxr-xr-xexamples/declarative/clocks/content/hour.pngbin0 -> 625 bytes-rwxr-xr-xexamples/declarative/clocks/content/minute.pngbin0 -> 625 bytes-rwxr-xr-xexamples/declarative/clocks/content/second.pngbin0 -> 303 bytes-rw-r--r--examples/declarative/connections/connections.qml31
-rw-r--r--examples/declarative/connections/content/Button.qml12
-rw-r--r--examples/declarative/connections/content/bg1.jpgbin0 -> 23771 bytes-rw-r--r--examples/declarative/connections/content/rotate-left.pngbin0 -> 3061 bytes-rw-r--r--examples/declarative/connections/content/rotate-right.pngbin0 -> 3115 bytes-rw-r--r--examples/declarative/dial/content/Dial.qml37
-rw-r--r--examples/declarative/dial/content/background.pngbin0 -> 35876 bytes-rw-r--r--examples/declarative/dial/content/needle.pngbin0 -> 342 bytes-rw-r--r--examples/declarative/dial/content/needle_shadow.pngbin0 -> 632 bytes-rw-r--r--examples/declarative/dial/content/overlay.pngbin0 -> 3564 bytes-rw-r--r--examples/declarative/dial/dial.qml35
-rw-r--r--examples/declarative/dynamic/dynamic.qml117
-rw-r--r--examples/declarative/dynamic/images/NOTE1
-rw-r--r--examples/declarative/dynamic/images/face-smile.pngbin0 -> 15408 bytes-rw-r--r--examples/declarative/dynamic/images/moon.pngbin0 -> 1757 bytes-rw-r--r--examples/declarative/dynamic/images/rabbit_brown.pngbin0 -> 1245 bytes-rw-r--r--examples/declarative/dynamic/images/rabbit_bw.pngbin0 -> 1759 bytes-rw-r--r--examples/declarative/dynamic/images/star.pngbin0 -> 349 bytes-rw-r--r--examples/declarative/dynamic/images/sun.pngbin0 -> 8153 bytes-rw-r--r--examples/declarative/dynamic/images/tree_s.pngbin0 -> 3406 bytes-rw-r--r--examples/declarative/dynamic/qml/Button.qml24
-rw-r--r--examples/declarative/dynamic/qml/GenericItem.qml13
-rw-r--r--examples/declarative/dynamic/qml/PaletteItem.qml13
-rw-r--r--examples/declarative/dynamic/qml/PerspectiveItem.qml15
-rw-r--r--examples/declarative/dynamic/qml/Sun.qml24
-rw-r--r--examples/declarative/dynamic/qml/itemCreation.js82
-rw-r--r--examples/declarative/effects/effects.qml60
-rw-r--r--examples/declarative/effects/pic.pngbin0 -> 12933 bytes-rw-r--r--examples/declarative/extending/adding/adding.pro11
-rw-r--r--examples/declarative/extending/adding/adding.qrc5
-rw-r--r--examples/declarative/extending/adding/example.qml8
-rw-r--r--examples/declarative/extending/adding/main.cpp62
-rw-r--r--examples/declarative/extending/adding/person.cpp70
-rw-r--r--examples/declarative/extending/adding/person.h67
-rw-r--r--examples/declarative/extending/attached/attached.pro13
-rw-r--r--examples/declarative/extending/attached/attached.qrc5
-rw-r--r--examples/declarative/extending/attached/birthdayparty.cpp85
-rw-r--r--examples/declarative/extending/attached/birthdayparty.h87
-rw-r--r--examples/declarative/extending/attached/example.qml29
-rw-r--r--examples/declarative/extending/attached/main.cpp84
-rw-r--r--examples/declarative/extending/attached/person.cpp123
-rw-r--r--examples/declarative/extending/attached/person.h107
-rw-r--r--examples/declarative/extending/binding/binding.pro15
-rw-r--r--examples/declarative/extending/binding/binding.qrc5
-rw-r--r--examples/declarative/extending/binding/birthdayparty.cpp106
-rw-r--r--examples/declarative/extending/binding/birthdayparty.h103
-rw-r--r--examples/declarative/extending/binding/example.qml37
-rw-r--r--examples/declarative/extending/binding/happybirthday.cpp87
-rw-r--r--examples/declarative/extending/binding/happybirthday.h (renamed from examples/assistant/simpletextviewer/mainwindow.h)67
-rw-r--r--examples/declarative/extending/binding/main.cpp85
-rw-r--r--examples/declarative/extending/binding/person.cpp143
-rw-r--r--examples/declarative/extending/binding/person.h115
-rw-r--r--examples/declarative/extending/coercion/birthdayparty.cpp63
-rw-r--r--examples/declarative/extending/coercion/birthdayparty.h69
-rw-r--r--examples/declarative/extending/coercion/coercion.pro13
-rw-r--r--examples/declarative/extending/coercion/coercion.qrc5
-rw-r--r--examples/declarative/extending/coercion/example.qml15
-rw-r--r--examples/declarative/extending/coercion/main.cpp70
-rw-r--r--examples/declarative/extending/coercion/person.cpp86
-rw-r--r--examples/declarative/extending/coercion/person.h81
-rw-r--r--examples/declarative/extending/default/birthdayparty.cpp63
-rw-r--r--examples/declarative/extending/default/birthdayparty.h70
-rw-r--r--examples/declarative/extending/default/default.pro13
-rw-r--r--examples/declarative/extending/default/default.qrc5
-rw-r--r--examples/declarative/extending/default/example.qml14
-rw-r--r--examples/declarative/extending/default/main.cpp70
-rw-r--r--examples/declarative/extending/default/person.cpp82
-rw-r--r--examples/declarative/extending/default/person.h79
-rw-r--r--examples/declarative/extending/extended/example.qml7
-rw-r--r--examples/declarative/extending/extended/extended.pro11
-rw-r--r--examples/declarative/extending/extended/extended.qrc5
-rw-r--r--examples/declarative/extending/extended/lineedit.cpp106
-rw-r--r--examples/declarative/extending/extended/lineedit.h74
-rw-r--r--examples/declarative/extending/extended/main.cpp62
-rw-r--r--examples/declarative/extending/grouped/birthdayparty.cpp63
-rw-r--r--examples/declarative/extending/grouped/birthdayparty.h68
-rw-r--r--examples/declarative/extending/grouped/example.qml33
-rw-r--r--examples/declarative/extending/grouped/grouped.pro13
-rw-r--r--examples/declarative/extending/grouped/grouped.qrc5
-rw-r--r--examples/declarative/extending/grouped/main.cpp80
-rw-r--r--examples/declarative/extending/grouped/person.cpp123
-rw-r--r--examples/declarative/extending/grouped/person.h109
-rw-r--r--examples/declarative/extending/properties/birthdayparty.cpp65
-rw-r--r--examples/declarative/extending/properties/birthdayparty.h75
-rw-r--r--examples/declarative/extending/properties/example.qml15
-rw-r--r--examples/declarative/extending/properties/main.cpp66
-rw-r--r--examples/declarative/extending/properties/person.cpp (renamed from examples/assistant/simpletextviewer/main.cpp)32
-rw-r--r--examples/declarative/extending/properties/person.h65
-rw-r--r--examples/declarative/extending/properties/properties.pro13
-rw-r--r--examples/declarative/extending/properties/properties.qrc5
-rw-r--r--examples/declarative/extending/signal/birthdayparty.cpp91
-rw-r--r--examples/declarative/extending/signal/birthdayparty.h (renamed from examples/assistant/simpletextviewer/findfiledialog.h)85
-rw-r--r--examples/declarative/extending/signal/example.qml32
-rw-r--r--examples/declarative/extending/signal/main.cpp85
-rw-r--r--examples/declarative/extending/signal/person.cpp123
-rw-r--r--examples/declarative/extending/signal/person.h107
-rw-r--r--examples/declarative/extending/signal/signal.pro13
-rw-r--r--examples/declarative/extending/signal/signal.qrc5
-rw-r--r--examples/declarative/extending/valuesource/birthdayparty.cpp101
-rw-r--r--examples/declarative/extending/valuesource/birthdayparty.h99
-rw-r--r--examples/declarative/extending/valuesource/example.qml36
-rw-r--r--examples/declarative/extending/valuesource/happybirthday.cpp82
-rw-r--r--examples/declarative/extending/valuesource/happybirthday.h79
-rw-r--r--examples/declarative/extending/valuesource/main.cpp85
-rw-r--r--examples/declarative/extending/valuesource/person.cpp123
-rw-r--r--examples/declarative/extending/valuesource/person.h107
-rw-r--r--examples/declarative/extending/valuesource/valuesource.pro15
-rw-r--r--examples/declarative/extending/valuesource/valuesource.qrc5
-rw-r--r--examples/declarative/fillmode/face.pngbin0 -> 905 bytes-rw-r--r--examples/declarative/fillmode/fillmode.qml41
-rw-r--r--examples/declarative/focusscope/test.qml76
-rw-r--r--examples/declarative/focusscope/test2.qml40
-rw-r--r--examples/declarative/focusscope/test3.qml52
-rw-r--r--examples/declarative/focusscope/test4.qml75
-rw-r--r--examples/declarative/fonts/banner.qml18
-rw-r--r--examples/declarative/fonts/fonts.qml69
-rw-r--r--examples/declarative/fonts/fonts/tarzeau_ocr_a.ttfbin0 -> 24544 bytes-rw-r--r--examples/declarative/fonts/hello.qml27
-rw-r--r--examples/declarative/gridview/gridview.qml38
-rw-r--r--examples/declarative/gridview/pics/AddressBook_48.pngbin0 -> 3350 bytes-rw-r--r--examples/declarative/gridview/pics/AudioPlayer_48.pngbin0 -> 3806 bytes-rw-r--r--examples/declarative/gridview/pics/Camera_48.pngbin0 -> 3540 bytes-rw-r--r--examples/declarative/gridview/pics/DateBook_48.pngbin0 -> 2610 bytes-rw-r--r--examples/declarative/gridview/pics/EMail_48.pngbin0 -> 3655 bytes-rw-r--r--examples/declarative/gridview/pics/TodoList_48.pngbin0 -> 3429 bytes-rw-r--r--examples/declarative/gridview/pics/VideoPlayer_48.pngbin0 -> 4151 bytes-rw-r--r--examples/declarative/layouts/Button.qml22
-rw-r--r--examples/declarative/layouts/add.pngbin0 -> 1577 bytes-rw-r--r--examples/declarative/layouts/del.pngbin0 -> 1661 bytes-rw-r--r--examples/declarative/layouts/layouts.qml31
-rw-r--r--examples/declarative/layouts/positioners.qml163
-rw-r--r--examples/declarative/listview/content/ClickAutoRepeating.qml30
-rw-r--r--examples/declarative/listview/content/MediaButton.qml35
-rw-r--r--examples/declarative/listview/content/pics/add.pngbin0 -> 1577 bytes-rw-r--r--examples/declarative/listview/content/pics/archive-insert.pngbin0 -> 896 bytes-rw-r--r--examples/declarative/listview/content/pics/archive-remove.pngbin0 -> 1074 bytes-rw-r--r--examples/declarative/listview/content/pics/button-pressed.pngbin0 -> 571 bytes-rw-r--r--examples/declarative/listview/content/pics/button.pngbin0 -> 564 bytes-rw-r--r--examples/declarative/listview/content/pics/del.pngbin0 -> 1661 bytes-rw-r--r--examples/declarative/listview/content/pics/fruit-salad.jpgbin0 -> 17952 bytes-rw-r--r--examples/declarative/listview/content/pics/go-down.pngbin0 -> 892 bytes-rw-r--r--examples/declarative/listview/content/pics/go-up.pngbin0 -> 929 bytes-rw-r--r--examples/declarative/listview/content/pics/hamburger.jpgbin0 -> 8572 bytes-rw-r--r--examples/declarative/listview/content/pics/lemonade.jpgbin0 -> 6645 bytes-rw-r--r--examples/declarative/listview/content/pics/list-add.pngbin0 -> 907 bytes-rw-r--r--examples/declarative/listview/content/pics/list-remove.pngbin0 -> 498 bytes-rw-r--r--examples/declarative/listview/content/pics/moreDown.pngbin0 -> 217 bytes-rw-r--r--examples/declarative/listview/content/pics/moreUp.pngbin0 -> 212 bytes-rw-r--r--examples/declarative/listview/content/pics/pancakes.jpgbin0 -> 9163 bytes-rw-r--r--examples/declarative/listview/content/pics/trash.pngbin0 -> 989 bytes-rw-r--r--examples/declarative/listview/content/pics/vegetable-soup.jpgbin0 -> 8639 bytes-rw-r--r--examples/declarative/listview/dummydata/MyPetsModel.qml61
-rw-r--r--examples/declarative/listview/dummydata/Recipes.qml90
-rw-r--r--examples/declarative/listview/dynamic.qml160
-rw-r--r--examples/declarative/listview/highlight.qml57
-rw-r--r--examples/declarative/listview/itemlist.qml60
-rw-r--r--examples/declarative/listview/listview.qml77
-rw-r--r--examples/declarative/listview/recipes.qml140
-rw-r--r--examples/declarative/listview/sections.qml67
-rw-r--r--examples/declarative/mouseregion/mouse.qml40
-rw-r--r--examples/declarative/objectlistmodel/dataobject.cpp73
-rw-r--r--examples/declarative/objectlistmodel/dataobject.h69
-rw-r--r--examples/declarative/objectlistmodel/main.cpp78
-rw-r--r--examples/declarative/objectlistmodel/objectlistmodel.pro11
-rw-r--r--examples/declarative/objectlistmodel/objectlistmodel.qrc5
-rw-r--r--examples/declarative/objectlistmodel/view.qml16
-rw-r--r--examples/declarative/parallax/parallax.qml41
-rw-r--r--examples/declarative/parallax/pics/background.jpgbin0 -> 209814 bytes-rw-r--r--examples/declarative/parallax/pics/face-smile.pngbin0 -> 15408 bytes-rw-r--r--examples/declarative/parallax/pics/home-page.svg445
-rw-r--r--examples/declarative/parallax/pics/shadow.pngbin0 -> 425 bytes-rw-r--r--examples/declarative/parallax/pics/yast-joystick.pngbin0 -> 2723 bytes-rw-r--r--examples/declarative/parallax/pics/yast-wol.pngbin0 -> 3769 bytes-rw-r--r--examples/declarative/parallax/qml/ParallaxView.qml83
-rw-r--r--examples/declarative/parallax/qml/Smiley.qml47
-rw-r--r--examples/declarative/plugins/README9
-rw-r--r--examples/declarative/plugins/files/Clock.qml50
-rw-r--r--examples/declarative/plugins/files/center.pngbin0 -> 765 bytes-rw-r--r--examples/declarative/plugins/files/clock.pngbin0 -> 20653 bytes-rw-r--r--examples/declarative/plugins/files/hour.pngbin0 -> 625 bytes-rw-r--r--examples/declarative/plugins/files/minute.pngbin0 -> 625 bytes-rw-r--r--examples/declarative/plugins/plugin.cpp161
-rw-r--r--examples/declarative/plugins/plugins.pro15
-rw-r--r--examples/declarative/plugins/plugins.qml12
-rw-r--r--examples/declarative/progressbar/content/ProgressBar.qml36
-rw-r--r--examples/declarative/progressbar/content/background.pngbin0 -> 426 bytes-rw-r--r--examples/declarative/progressbar/progressbars.qml24
-rw-r--r--examples/declarative/scrollbar/ScrollBar.qml31
-rw-r--r--examples/declarative/scrollbar/display.qml57
-rw-r--r--examples/declarative/scrollbar/pics/niagara_falls.jpgbin0 -> 604121 bytes-rw-r--r--examples/declarative/searchbox/SearchBox.qml60
-rw-r--r--examples/declarative/searchbox/images/edit-clear-locationbar-rtl.pngbin0 -> 429 bytes-rw-r--r--examples/declarative/searchbox/images/lineedit-bg-focus.pngbin0 -> 526 bytes-rw-r--r--examples/declarative/searchbox/images/lineedit-bg.pngbin0 -> 426 bytes-rw-r--r--examples/declarative/searchbox/main.qml13
-rw-r--r--examples/declarative/slideswitch/content/Switch.qml73
-rw-r--r--examples/declarative/slideswitch/content/background.svg23
-rw-r--r--examples/declarative/slideswitch/content/knob.svg867
-rw-r--r--examples/declarative/slideswitch/slideswitch.qml11
-rw-r--r--examples/declarative/snow/ImageBatch.qml72
-rw-r--r--examples/declarative/snow/Loading.qml8
-rw-r--r--examples/declarative/snow/create.js12
-rw-r--r--examples/declarative/snow/pics/loading.pngbin0 -> 761 bytes-rw-r--r--examples/declarative/snow/snow.qml69
-rw-r--r--examples/declarative/sql/hello.qml31
-rw-r--r--examples/declarative/states/states.qml50
-rw-r--r--examples/declarative/states/transitions.qml70
-rw-r--r--examples/declarative/states/user.pngbin0 -> 4886 bytes-rw-r--r--examples/declarative/tabwidget/TabWidget.qml42
-rw-r--r--examples/declarative/tabwidget/tabs.qml29
-rw-r--r--examples/declarative/tic-tac-toe/content/TicTac.qml20
-rw-r--r--examples/declarative/tic-tac-toe/content/pics/board.pngbin0 -> 5524 bytes-rw-r--r--examples/declarative/tic-tac-toe/content/pics/o.pngbin0 -> 1470 bytes-rw-r--r--examples/declarative/tic-tac-toe/content/pics/x.pngbin0 -> 1331 bytes-rw-r--r--examples/declarative/tic-tac-toe/tic-tac-toe.qml115
-rw-r--r--examples/declarative/tutorials/helloworld/Cell.qml32
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial1.qml22
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial2.qml31
-rw-r--r--examples/declarative/tutorials/helloworld/tutorial3.qml51
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Block.qml12
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/Button.qml27
-rw-r--r--examples/declarative/tutorials/samegame/samegame1/pics/background.pngbin0 -> 313930 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame1/pics/redStone.pngbin0 -> 2902 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame1/samegame.qml40
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Block.qml10
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/Button.qml25
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/pics/background.pngbin0 -> 313930 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame2/pics/redStone.pngbin0 -> 2902 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.js61
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.qml43
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Block.qml21
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Button.qml25
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/Dialog.qml23
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/pics/background.pngbin0 -> 313930 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame3/pics/blueStone.pngbin0 -> 3054 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame3/pics/greenStone.pngbin0 -> 2932 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame3/pics/redStone.pngbin0 -> 2902 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.js189
-rw-r--r--examples/declarative/tutorials/samegame/samegame3/samegame.qml62
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml63
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Button.qml25
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml21
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/pics/background.pngbin0 -> 313930 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/pics/blueStar.pngbin0 -> 278 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/pics/blueStone.pngbin0 -> 3054 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/pics/greenStar.pngbin0 -> 273 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/pics/greenStone.pngbin0 -> 2932 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/pics/redStar.pngbin0 -> 274 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/pics/redStone.pngbin0 -> 2902 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/pics/star.pngbin0 -> 262 bytes-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/pics/yellowStone.pngbin0 -> 3056 bytes-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/content/samegame.js249
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/highscores/README1
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/highscores/score_data.xml2
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/highscores/score_style.xsl28
-rwxr-xr-xexamples/declarative/tutorials/samegame/samegame4/highscores/scores.php34
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/samegame.qml77
-rw-r--r--examples/declarative/tvtennis/click.wavbin0 -> 3056 bytes-rw-r--r--examples/declarative/tvtennis/paddle.wavbin0 -> 5320 bytes-rw-r--r--examples/declarative/tvtennis/tvtennis.qml74
-rw-r--r--examples/declarative/velocity/Day.qml78
-rw-r--r--examples/declarative/velocity/cork.jpgbin0 -> 88766 bytes-rw-r--r--examples/declarative/velocity/sticky.pngbin0 -> 15319 bytes-rw-r--r--examples/declarative/velocity/tack.pngbin0 -> 7282 bytes-rw-r--r--examples/declarative/velocity/velocity.qml108
-rw-r--r--examples/declarative/webview/autosize.qml60
-rw-r--r--examples/declarative/webview/content/FieldText.qml161
-rw-r--r--examples/declarative/webview/content/Mapping/Map.qml20
-rwxr-xr-xexamples/declarative/webview/content/Mapping/map.html47
-rw-r--r--examples/declarative/webview/content/SpinSquare.qml25
-rw-r--r--examples/declarative/webview/content/pics/cancel.pngbin0 -> 1038 bytes-rw-r--r--examples/declarative/webview/content/pics/ok.pngbin0 -> 655 bytes-rw-r--r--examples/declarative/webview/evalandattach.html31
-rw-r--r--examples/declarative/webview/evalandattach.qml54
-rw-r--r--examples/declarative/webview/googleMaps.qml31
-rw-r--r--examples/declarative/webview/inline-html.qml14
-rw-r--r--examples/declarative/webview/newwindows.html3
-rw-r--r--examples/declarative/webview/newwindows.qml30
-rw-r--r--examples/declarative/webview/qml-in-html.qml32
-rw-r--r--examples/declarative/webview/transparent.qml13
-rw-r--r--examples/declarative/workerscript/workerscript.js15
-rw-r--r--examples/declarative/workerscript/workerscript.qml47
-rw-r--r--examples/declarative/xmldata/daringfireball.qml45
-rw-r--r--examples/declarative/xmldata/yahoonews.qml79
-rw-r--r--examples/declarative/xmlhttprequest/test.qml36
-rw-r--r--examples/declarative/xmlhttprequest/test.xml5
-rw-r--r--examples/dialogs/standarddialogs/dialog.cpp7
-rw-r--r--examples/draganddrop/draggabletext/dragwidget.cpp2
-rw-r--r--examples/examples.pro7
-rw-r--r--examples/help/remotecontrol/remotecontrol.cpp2
-rw-r--r--examples/help/simpletextviewer/assistant.cpp2
-rw-r--r--examples/itemviews/dirview/main.cpp3
-rw-r--r--examples/opengl/hellogl_es/cl_helper.h133
-rw-r--r--examples/opengl/hellogl_es/glwidget.cpp137
-rw-r--r--examples/opengl/hellogl_es/glwidget.h5
-rw-r--r--examples/opengl/opengl.pro6
-rw-r--r--examples/qtestlib/tutorial5/containers.cpp269
-rw-r--r--examples/tools/completer/completer.pro4
-rw-r--r--examples/tools/completer/fsmodel.cpp (renamed from examples/tools/completer/dirmodel.cpp)11
-rw-r--r--examples/tools/completer/fsmodel.h (renamed from examples/tools/completer/dirmodel.h)12
-rw-r--r--examples/tools/completer/mainwindow.cpp20
-rw-r--r--examples/webkit/fancybrowser/main.cpp9
-rw-r--r--examples/webkit/fancybrowser/mainwindow.cpp27
-rw-r--r--examples/webkit/fancybrowser/mainwindow.h5
375 files changed, 12910 insertions, 1215 deletions
diff --git a/examples/assistant/README b/examples/assistant/README
deleted file mode 100644
index 85f5a43..0000000
--- a/examples/assistant/README
+++ /dev/null
@@ -1,38 +0,0 @@
-Support for interactive help is provided by the Qt Assistant application.
-Developers can take advantages of the facilities it offers to display
-specially-prepared documentation to users of their applications.
-
-
-The example launcher provided with Qt can be used to explore each of the
-examples in this directory.
-
-Documentation for these examples can be found via the Tutorial and Examples
-link in the main Qt documentation.
-
-
-Finding the Qt Examples and Demos launcher
-==========================================
-
-On Windows:
-
-The launcher can be accessed via the Windows Start menu. Select the menu
-entry entitled "Qt Examples and Demos" entry in the submenu containing
-the Qt tools.
-
-On Mac OS X:
-
-For the binary distribution, the qtdemo executable is installed in the
-/Developer/Applications/Qt directory. For the source distribution, it is
-installed alongside the other Qt tools on the path specified when Qt is
-configured.
-
-On Unix/Linux:
-
-The qtdemo executable is installed alongside the other Qt tools on the path
-specified when Qt is configured.
-
-On all platforms:
-
-The source code for the launcher can be found in the demos/qtdemo directory
-in the Qt package. This example is built at the same time as the Qt libraries,
-tools, examples, and demonstrations.
diff --git a/examples/assistant/assistant.pro b/examples/assistant/assistant.pro
deleted file mode 100644
index ff1f947..0000000
--- a/examples/assistant/assistant.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = simpletextviewer
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/assistant
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS assistant.pro README
-sources.path = $$[QT_INSTALL_EXAMPLES]/assistant
-INSTALLS += target sources
-
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
diff --git a/examples/assistant/simpletextviewer/documentation/about.txt b/examples/assistant/simpletextviewer/documentation/about.txt
deleted file mode 100644
index eeab35f..0000000
--- a/examples/assistant/simpletextviewer/documentation/about.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-The Simple Text Viewer enables the user to select and view existing
-files.
-
-HTML files is displayed using rich text, while other files are
-presented as plain text. The application provides a file dialog
-allowing the user to search for files using wildcard matching. The
-search is performed within in the specified directory, and the user is
-given an option to browse the existing file system to find the
-relevant directory.
diff --git a/examples/assistant/simpletextviewer/documentation/browse.html b/examples/assistant/simpletextviewer/documentation/browse.html
deleted file mode 100644
index 987abf3..0000000
--- a/examples/assistant/simpletextviewer/documentation/browse.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Browse</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Browse</h2></center></p>
-
- <p>
- The file dialog let you browse the current file system to
- specify the directory in which the file you want to open
- resides.
- Note that only the specified directory will be searched, any
- subdirectories will simply be ignored.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/browse.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- See also: <a href="filedialog.html">File Dialog</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
- <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
-
diff --git a/examples/assistant/simpletextviewer/documentation/filedialog.html b/examples/assistant/simpletextviewer/documentation/filedialog.html
deleted file mode 100644
index afa65ed..0000000
--- a/examples/assistant/simpletextviewer/documentation/filedialog.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>File Dialog</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>File Dialog</h2></center></p>
-
- <p>
- In the file dialog you can name a particular file name, or
- search for files using wildcard matching, i.e. specify a
- file name containing wildcards. In addition you must specify
- the directory in which the file you search for resides.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/filedialog.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- By default the dialog will search for all files (*) in the
- current directory (the directory the application is run from).
- </p>
-
- <p>
- When editing the file name and directory parameters, an
- overview of the matching files are displayed in the
- dialog. The overview is updated whenever the parameters
- change.
- </p>
-
- <br />
- <br />
- <p>
- See also: <a href="browse.html">Browse</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
- <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
-
-
diff --git a/examples/assistant/simpletextviewer/documentation/findfile.html b/examples/assistant/simpletextviewer/documentation/findfile.html
deleted file mode 100644
index 32e0147..0000000
--- a/examples/assistant/simpletextviewer/documentation/findfile.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Find File</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Find File</h2></center></p>
-
- <p>
- To open and view a file in the Simple Text Viewer, select the
- 'Open...' option in the 'File' menu. The application will then
- provide you with a file dialog that you can use to search for
- any existing file.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/fadedfilemenu.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- See also: <a href="openfile.html">Open File</a>, <a href="filedialog.html">File Dialog</a>
- </p>
- </body>
-</html>
-
diff --git a/examples/assistant/simpletextviewer/documentation/images/browse.png b/examples/assistant/simpletextviewer/documentation/images/browse.png
deleted file mode 100644
index 86db6b1..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/browse.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png b/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
deleted file mode 100644
index fde0e43..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/filedialog.png b/examples/assistant/simpletextviewer/documentation/images/filedialog.png
deleted file mode 100644
index 883a33a..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/filedialog.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/handbook.png b/examples/assistant/simpletextviewer/documentation/images/handbook.png
deleted file mode 100644
index 3bd2b92..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/handbook.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/mainwindow.png b/examples/assistant/simpletextviewer/documentation/images/mainwindow.png
deleted file mode 100644
index c28d5e9..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/mainwindow.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/open.png b/examples/assistant/simpletextviewer/documentation/images/open.png
deleted file mode 100644
index 1e5bba3..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/open.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/wildcard.png b/examples/assistant/simpletextviewer/documentation/images/wildcard.png
deleted file mode 100644
index 6e83a56..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/wildcard.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/index.html b/examples/assistant/simpletextviewer/documentation/index.html
deleted file mode 100644
index 5a7b1d5..0000000
--- a/examples/assistant/simpletextviewer/documentation/index.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Manual</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Simple Text Viewer</h2></center></p>
-
- <p>
- The Simple Text Viewer enables the user to select and view
- existing files.
- </p>
-
- <p><center>
- <img src="images/mainwindow.png" />
- </center></p>
-
- <p>
- HTML files is displayed using rich text, while
- other files are presented as plain text. The application
- provides a file dialog allowing the user to search for files
- using wildcard matching. The search is performed within in the
- specified directory, and the user is given an option to browse
- the existing file system to find the relevant directory.
- </p>
-
- <ul>
- <li><a href="findfile.html">Find File</a></li>
- <ul>
- <li><a href="filedialog.html">File Dialog</a></li>
- <li><a href="wildcardmatching.html">WildCard Matching</a></li>
- <li><a href="browse.html">Browse</a></li>
- </ul>
- <li><a href="openfile.html">Open File</a></li>
- </ul>
- </body>
-</html>
-
-
-
diff --git a/examples/assistant/simpletextviewer/documentation/intro.html b/examples/assistant/simpletextviewer/documentation/intro.html
deleted file mode 100644
index 2e2aa40..0000000
--- a/examples/assistant/simpletextviewer/documentation/intro.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Manual</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Simple Text Viewer</h2></center></p>
-
- <p>
- The Simple Text Viewer enables the user to select and view
- existing files.
- </p>
-
- <p><center>
- <img src="images/mainwindow.png" />
- </center></p>
-
- <p>
- The application provides its own custom documentation that is
- available through the <b>Help</b> menu in the main window's menubar
- and through the <b>Help</b> button in the application's find file
- dialog.
- </p>
-
- </body>
-</html>
-
diff --git a/examples/assistant/simpletextviewer/documentation/openfile.html b/examples/assistant/simpletextviewer/documentation/openfile.html
deleted file mode 100644
index e172de9..0000000
--- a/examples/assistant/simpletextviewer/documentation/openfile.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Open File</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Open File</h2></center></p>
-
- <p>
- Once the file you want to view appears in the dialog's
- display, you can open it in two different ways.
- </p>
-
- <p>
- By pressing the 'Open' button the currently selected file will
- be opened. By default, the first file in the list of matching
- files is selected. Another way of opening a file is to simply
- double click the displayed file name.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/open.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- See also: <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
diff --git a/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp b/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp
deleted file mode 100644
index 660df4f..0000000
--- a/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE DCF>
-
-<assistantconfig version="3.2.0">
-
-<profile>
- <property name="name">simpletextviewer</property>
- <property name="title">Simple Text Viewer</property>
- <property name="applicationicon">images/handbook.png</property>
- <property name="startpage">index.html</property>
- <property name="aboutmenutext">About Simple Text Viewer</property>
- <property name="abouturl">about.txt</property>
- <property name="assistantdocs">.</property>
-</profile>
-
-<DCF ref="index.html" icon="images/handbook.png" title="Simple Text Viewer">
- <section ref="./findfile.html" title="Find File">
- <keyword ref="./index.html">Display</keyword>
- <keyword ref="./index.html">Rich text</keyword>
- <keyword ref="./index.html">Plain text</keyword>
- <keyword ref="./findfile.html">Find</keyword>
- <keyword ref="./findfile.html">File menu</keyword>
- <keyword ref="./filedialog.html">File name</keyword>
- <keyword ref="./filedialog.html">File dialog</keyword>
- <keyword ref="./wildcardmatching.html">File globbing</keyword>
- <keyword ref="./wildcardmatching.html">Wildcard matching</keyword>
- <keyword ref="./wildcardmatching.html">Wildcard syntax</keyword>
- <keyword ref="./browse.html">Browse</keyword>
- <keyword ref="./browse.html">Directory</keyword>
- <keyword ref="./openfile.html">Open</keyword>
- <keyword ref="./openfile.html">Select</keyword>
-
- <section ref="./filedialog.html" title="File Dialog" />
- <section ref="./wildcardmatching.html" title="Wildcard Matching" />
- <section ref="./browse.html" title="Browse" />
- </section>
- <section ref="./openfile.html" title="Open File" />
-</DCF>
-
-</assistantconfig>
-
diff --git a/examples/assistant/simpletextviewer/documentation/wildcardmatching.html b/examples/assistant/simpletextviewer/documentation/wildcardmatching.html
deleted file mode 100644
index eb1839a..0000000
--- a/examples/assistant/simpletextviewer/documentation/wildcardmatching.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Wildcard Matching</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Wildcard Matching</h2></center></p>
-
- <p>
- Most command shells such as bash or cmd.exe support "file
- globbing", the ability to identify a group of files by using
- wildcards.
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/wildcard.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- Wildcard matching provides four features:
- </p>
-
- <ul>
- <li>Any character represents itself apart from those
- mentioned below. Thus 'c' matches the character 'c'.
- </li>
- <li>The '?' character matches any single character.</li>
- <li>The '*' matches zero or more of any characters.</li>
- <li>Sets of characters can be represented in square brackets.
- Within the character class, like outside, backslash
- has no special meaning.
- </li>
- </ul>
-
- <p>
- For example we could identify HTML files with
- <code>*.html</code>. This will match zero or more characters
- followed by a dot followed by 'h', 't', 'm' and 'l'.
- </p>
-
- <br />
- <br />
- <p>
- See also: <a href="browse.html">Browse</a>, <a href="filedialog.html">File Dialog</a>,
- <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
-
-
-
diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp
deleted file mode 100644
index 1f11f69..0000000
--- a/examples/assistant/simpletextviewer/findfiledialog.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** 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.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtGui>
-
-#include "findfiledialog.h"
-
-//! [0]
-FindFileDialog::FindFileDialog(QTextEdit *editor, QAssistantClient *assistant,
- QWidget *parent)
- : QDialog(parent)
-{
- currentAssistantClient = assistant;
- currentEditor = editor;
-//! [0]
-
- createButtons();
- createComboBoxes();
- createFilesTree();
- createLabels();
- createLayout();
-
- directoryComboBox->addItem(QDir::toNativeSeparators(QDir::currentPath()));
- fileNameComboBox->addItem("*");
- findFiles();
-
- setWindowTitle(tr("Find File"));
-//! [1]
-}
-//! [1]
-
-void FindFileDialog::browse()
-{
- QString currentDirectory = directoryComboBox->currentText();
- QString newDirectory = QFileDialog::getExistingDirectory(this,
- tr("Select Directory"), currentDirectory);
- if (!newDirectory.isEmpty()) {
- directoryComboBox->addItem(QDir::toNativeSeparators(newDirectory));
- directoryComboBox->setCurrentIndex(directoryComboBox->count() - 1);
- update();
- }
-}
-
-//! [2]
-void FindFileDialog::help()
-{
- currentAssistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
- QDir::separator() + "assistant/simpletextviewer/documentation/filedialog.html");
-}
-//! [2]
-
-void FindFileDialog::openFile(QTreeWidgetItem *item)
-{
- if (!item) {
- item = foundFilesTree->currentItem();
- if (!item)
- return;
- }
-
- QString fileName = item->text(0);
- QString path = directoryComboBox->currentText() + QDir::separator();
-
- QFile file(path + fileName);
- if (file.open(QIODevice::ReadOnly)) {
- QString data(file.readAll());
-
- if (fileName.endsWith(QLatin1String(".html")))
- currentEditor->setHtml(data);
- else
- currentEditor->setPlainText(data);
- }
- close();
-}
-
-void FindFileDialog::update()
-{
- findFiles();
- buttonBox->button(QDialogButtonBox::Open)->setEnabled(
- foundFilesTree->topLevelItemCount() > 0);
-}
-
-void FindFileDialog::findFiles()
-{
- QRegExp filePattern(fileNameComboBox->currentText() + '*');
- filePattern.setPatternSyntax(QRegExp::Wildcard);
-
- QDir directory(directoryComboBox->currentText());
-
- QStringList allFiles = directory.entryList(QDir::Files | QDir::NoSymLinks);
- QStringList matchingFiles;
-
- foreach (const QString &file, allFiles) {
- if (filePattern.exactMatch(file))
- matchingFiles << file;
- }
- showFiles(matchingFiles);
-}
-
-void FindFileDialog::showFiles(const QStringList &files)
-{
- foundFilesTree->clear();
-
- for (int i = 0; i < files.count(); ++i) {
- QTreeWidgetItem *item = new QTreeWidgetItem(foundFilesTree);
- item->setText(0, files[i]);
- }
-
- if (files.count() > 0)
- foundFilesTree->setCurrentItem(foundFilesTree->topLevelItem(0));
-}
-
-void FindFileDialog::createButtons()
-{
- browseButton = new QToolButton;
- browseButton->setText(tr("..."));
- connect(browseButton, SIGNAL(clicked()), this, SLOT(browse()));
-
- buttonBox = new QDialogButtonBox(QDialogButtonBox::Open
- | QDialogButtonBox::Cancel
- | QDialogButtonBox::Help);
- connect(buttonBox, SIGNAL(accepted()), this, SLOT(openFile()));
- connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
- connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(help()));
-}
-
-void FindFileDialog::createComboBoxes()
-{
- directoryComboBox = new QComboBox;
- fileNameComboBox = new QComboBox;
-
- fileNameComboBox->setEditable(true);
- fileNameComboBox->setSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Preferred);
-
- directoryComboBox->setMinimumContentsLength(30);
- directoryComboBox->setSizeAdjustPolicy(
- QComboBox::AdjustToMinimumContentsLength);
- directoryComboBox->setSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Preferred);
-
- connect(fileNameComboBox, SIGNAL(editTextChanged(QString)),
- this, SLOT(update()));
- connect(directoryComboBox, SIGNAL(currentIndexChanged(QString)),
- this, SLOT(update()));
-}
-
-void FindFileDialog::createFilesTree()
-{
- foundFilesTree = new QTreeWidget;
- foundFilesTree->setColumnCount(1);
- foundFilesTree->setHeaderLabels(QStringList(tr("Matching Files")));
- foundFilesTree->setRootIsDecorated(false);
- foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection);
-
- connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem*,int)),
- this, SLOT(openFile(QTreeWidgetItem*)));
-}
-
-void FindFileDialog::createLabels()
-{
- directoryLabel = new QLabel(tr("Search in:"));
- fileNameLabel = new QLabel(tr("File name (including wildcards):"));
-}
-
-void FindFileDialog::createLayout()
-{
- QHBoxLayout *fileLayout = new QHBoxLayout;
- fileLayout->addWidget(fileNameLabel);
- fileLayout->addWidget(fileNameComboBox);
-
- QHBoxLayout *directoryLayout = new QHBoxLayout;
- directoryLayout->addWidget(directoryLabel);
- directoryLayout->addWidget(directoryComboBox);
- directoryLayout->addWidget(browseButton);
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addLayout(fileLayout);
- mainLayout->addLayout(directoryLayout);
- mainLayout->addWidget(foundFilesTree);
- mainLayout->addStretch();
- mainLayout->addWidget(buttonBox);
- setLayout(mainLayout);
-}
diff --git a/examples/assistant/simpletextviewer/mainwindow.cpp b/examples/assistant/simpletextviewer/mainwindow.cpp
deleted file mode 100644
index 03eab02..0000000
--- a/examples/assistant/simpletextviewer/mainwindow.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** 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.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtGui>
-
-#include "mainwindow.h"
-#include "findfiledialog.h"
-
-//! [0]
-MainWindow::MainWindow()
-{
- textViewer = new QTextEdit;
- textViewer->setReadOnly(true);
- QFile file("documentation/intro.html");
- if (file.open(QIODevice::ReadOnly))
- textViewer->setHtml(file.readAll());
-
- setCentralWidget(textViewer);
-
- createActions();
- createMenus();
-
- initializeAssistant();
-
- setWindowTitle(tr("Simple Text Viewer"));
- resize(750, 400);
-}
-//! [0]
-
-//! [1]
-void MainWindow::closeEvent(QCloseEvent *)
-{
- if (assistantClient)
- assistantClient->closeAssistant();
-}
-//! [1]
-
-void MainWindow::about()
-{
- QMessageBox::about(this, tr("About Simple Text Viewer"),
- tr("This example demonstrates how to use\n" \
- "Qt Assistant as help system for your\n" \
- "own application."));
-}
-
-//! [2]
-void MainWindow::assistant()
-{
- assistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
- QDir::separator() +
- "assistant/simpletextviewer/documentation/index.html");
-}
-//! [2]
-
-//! [3]
-void MainWindow::open()
-{
- FindFileDialog dialog(textViewer, assistantClient);
- dialog.exec();
-}
-//! [3]
-
-void MainWindow::createActions()
-{
- assistantAct = new QAction(tr("Help Contents"), this);
- assistantAct->setShortcuts(QKeySequence::HelpContents);
- connect(assistantAct, SIGNAL(triggered()), this, SLOT(assistant()));
-
- openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcuts(QKeySequence::Open);
- connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
-
- clearAct = new QAction(tr("&Clear"), this);
- clearAct->setShortcut(tr("Ctrl+C"));
- connect(clearAct, SIGNAL(triggered()), textViewer, SLOT(clear()));
-
- exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcuts(QKeySequence::Quit);
- connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
-
- aboutAct = new QAction(tr("&About"), this);
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
-
- aboutQtAct = new QAction(tr("About &Qt"), this);
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
-}
-
-void MainWindow::createMenus()
-{
- fileMenu = new QMenu(tr("&File"), this);
- fileMenu->addAction(openAct);
- fileMenu->addAction(clearAct);
- fileMenu->addSeparator();
- fileMenu->addAction(exitAct);
-
- helpMenu = new QMenu(tr("&Help"), this);
- helpMenu->addAction(assistantAct);
- helpMenu->addSeparator();
- helpMenu->addAction(aboutAct);
- helpMenu->addAction(aboutQtAct);
-
-
- menuBar()->addMenu(fileMenu);
- menuBar()->addMenu(helpMenu);
-}
-
-//! [4]
-void MainWindow::initializeAssistant()
-{
- assistantClient = new QAssistantClient(QLibraryInfo::location(QLibraryInfo::BinariesPath), this);
-
- QStringList arguments;
- arguments << "-profile" << QString("documentation") + QDir::separator() + QString("simpletextviewer.adp");
- assistantClient->setArguments(arguments);
-}
-//! [4]
diff --git a/examples/assistant/simpletextviewer/simpletextviewer.pro b/examples/assistant/simpletextviewer/simpletextviewer.pro
deleted file mode 100644
index 2c0eada..0000000
--- a/examples/assistant/simpletextviewer/simpletextviewer.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-CONFIG += assistant
-
-QT += network
-
-HEADERS = mainwindow.h \
- findfiledialog.h
-SOURCES = main.cpp \
- mainwindow.cpp \
- findfiledialog.cpp
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
-sources.files = $$SOURCES $$HEADERS $$RESOURCES documentation *.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
-INSTALLS += target sources
-
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
-
diff --git a/examples/dbus/dbus-chat/chat_adaptor.cpp b/examples/dbus/dbus-chat/chat_adaptor.cpp
index dc07e1c..77e7ab0 100644
--- a/examples/dbus/dbus-chat/chat_adaptor.cpp
+++ b/examples/dbus/dbus-chat/chat_adaptor.cpp
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -i chat_adaptor.h -a :chat_adaptor.cpp com.trolltech.chat.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -i chat_adaptor.h -a :chat_adaptor.cpp com.trolltech.chat.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
diff --git a/examples/dbus/dbus-chat/chat_adaptor.h b/examples/dbus/dbus-chat/chat_adaptor.h
index b1e66ad..47b7f8f 100644
--- a/examples/dbus/dbus-chat/chat_adaptor.h
+++ b/examples/dbus/dbus-chat/chat_adaptor.h
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -a chat_adaptor.h: com.trolltech.chat.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -a chat_adaptor.h: com.trolltech.chat.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** This file may have been hand-edited. Look for HAND-EDIT comments
@@ -49,8 +49,8 @@
**
****************************************************************************/
-#ifndef CHAT_ADAPTOR_H_142741156243605
-#define CHAT_ADAPTOR_H_142741156243605
+#ifndef CHAT_ADAPTOR_H_1257535021
+#define CHAT_ADAPTOR_H_1257535021
#include <QtCore/QObject>
#include <QtDBus/QtDBus>
@@ -72,14 +72,14 @@ class ChatAdaptor: public QDBusAbstractAdaptor
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "com.trolltech.chat")
Q_CLASSINFO("D-Bus Introspection", ""
-" <interface name=\"com.trolltech.chat\" >\n"
-" <signal name=\"message\" >\n"
-" <arg direction=\"out\" type=\"s\" name=\"nickname\" />\n"
-" <arg direction=\"out\" type=\"s\" name=\"text\" />\n"
+" <interface name=\"com.trolltech.chat\">\n"
+" <signal name=\"message\">\n"
+" <arg direction=\"out\" type=\"s\" name=\"nickname\"/>\n"
+" <arg direction=\"out\" type=\"s\" name=\"text\"/>\n"
" </signal>\n"
-" <signal name=\"action\" >\n"
-" <arg direction=\"out\" type=\"s\" name=\"nickname\" />\n"
-" <arg direction=\"out\" type=\"s\" name=\"text\" />\n"
+" <signal name=\"action\">\n"
+" <arg direction=\"out\" type=\"s\" name=\"nickname\"/>\n"
+" <arg direction=\"out\" type=\"s\" name=\"text\"/>\n"
" </signal>\n"
" </interface>\n"
"")
diff --git a/examples/dbus/dbus-chat/chat_interface.cpp b/examples/dbus/dbus-chat/chat_interface.cpp
index f187ee0..3aba098 100644
--- a/examples/dbus/dbus-chat/chat_interface.cpp
+++ b/examples/dbus/dbus-chat/chat_interface.cpp
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -i chat_interface.h -p :chat_interface.cpp chat/com.trolltech.chat.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -i chat_interface.h -p :chat_interface.cpp com.trolltech.chat.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** This file may have been hand-edited. Look for HAND-EDIT comments
diff --git a/examples/dbus/dbus-chat/chat_interface.h b/examples/dbus/dbus-chat/chat_interface.h
index 3bf427b..a6aa2df 100644
--- a/examples/dbus/dbus-chat/chat_interface.h
+++ b/examples/dbus/dbus-chat/chat_interface.h
@@ -38,18 +38,18 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -p chat_interface.h: com.trolltech.chat.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -p chat_interface.h: com.trolltech.chat.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
**
****************************************************************************/
-#ifndef CHAT_INTERFACE_H_143021156243606
-#define CHAT_INTERFACE_H_143021156243606
+#ifndef CHAT_INTERFACE_H_1257535021
+#define CHAT_INTERFACE_H_1257535021
#include <QtCore/QObject>
#include <QtCore/QByteArray>
diff --git a/examples/dbus/remotecontrolledcar/car/car.pro b/examples/dbus/remotecontrolledcar/car/car.pro
index 9b426d3..d362dc9 100644
--- a/examples/dbus/remotecontrolledcar/car/car.pro
+++ b/examples/dbus/remotecontrolledcar/car/car.pro
@@ -10,7 +10,7 @@ CONFIG += qdbus
# Input
# DBUS_ADAPTORS += car.xml
-HEADERS += car.h car_adaptor_p.h
+HEADERS += car.h car_adaptor.h
SOURCES += car.cpp main.cpp car_adaptor.cpp
# install
diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
index bd4832e..da7505b 100644
--- a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
+++ b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
@@ -38,17 +38,17 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -i car_adaptor.h -a :car_adaptor.cpp car.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
**
****************************************************************************/
-#include "car_adaptor_p.h"
+#include "car_adaptor.h"
#include <QtCore/QMetaObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
@@ -58,40 +58,40 @@
#include <QtCore/QVariant>
/*
- * Implementation of adaptor class CarAdaptor
+ * Implementation of adaptor class CarInterfaceAdaptor
*/
-CarAdaptor::CarAdaptor(QObject *parent)
+CarInterfaceAdaptor::CarInterfaceAdaptor(QObject *parent)
: QDBusAbstractAdaptor(parent)
{
// constructor
setAutoRelaySignals(true);
}
-CarAdaptor::~CarAdaptor()
+CarInterfaceAdaptor::~CarInterfaceAdaptor()
{
// destructor
}
-void CarAdaptor::accelerate()
+void CarInterfaceAdaptor::accelerate()
{
// handle method call com.trolltech.Examples.CarInterface.accelerate
QMetaObject::invokeMethod(parent(), "accelerate");
}
-void CarAdaptor::decelerate()
+void CarInterfaceAdaptor::decelerate()
{
// handle method call com.trolltech.Examples.CarInterface.decelerate
QMetaObject::invokeMethod(parent(), "decelerate");
}
-void CarAdaptor::turnLeft()
+void CarInterfaceAdaptor::turnLeft()
{
// handle method call com.trolltech.Examples.CarInterface.turnLeft
QMetaObject::invokeMethod(parent(), "turnLeft");
}
-void CarAdaptor::turnRight()
+void CarInterfaceAdaptor::turnRight()
{
// handle method call com.trolltech.Examples.CarInterface.turnRight
QMetaObject::invokeMethod(parent(), "turnRight");
diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h b/examples/dbus/remotecontrolledcar/car/car_adaptor.h
index 5f769cd..d16972e 100644
--- a/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h
+++ b/examples/dbus/remotecontrolledcar/car/car_adaptor.h
@@ -1,17 +1,17 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -25,23 +25,23 @@
** 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.
+**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -a car_adaptor.h: car.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** This file may have been hand-edited. Look for HAND-EDIT comments
@@ -49,8 +49,8 @@
**
****************************************************************************/
-#ifndef CAR_ADAPTOR_P_H_1157030132
-#define CAR_ADAPTOR_P_H_1157030132
+#ifndef CAR_ADAPTOR_H_1264773009
+#define CAR_ADAPTOR_H_1264773009
#include <QtCore/QObject>
#include <QtDBus/QtDBus>
@@ -67,22 +67,22 @@ QT_END_NAMESPACE
/*
* Adaptor class for interface com.trolltech.Examples.CarInterface
*/
-class CarAdaptor: public QDBusAbstractAdaptor
+class CarInterfaceAdaptor: public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "com.trolltech.Examples.CarInterface")
Q_CLASSINFO("D-Bus Introspection", ""
-" <interface name=\"com.trolltech.Examples.CarInterface\" >\n"
-" <method name=\"accelerate\" />\n"
-" <method name=\"decelerate\" />\n"
-" <method name=\"turnLeft\" />\n"
-" <method name=\"turnRight\" />\n"
-" <signal name=\"crashed\" />\n"
+" <interface name=\"com.trolltech.Examples.CarInterface\">\n"
+" <method name=\"accelerate\"/>\n"
+" <method name=\"decelerate\"/>\n"
+" <method name=\"turnLeft\"/>\n"
+" <method name=\"turnRight\"/>\n"
+" <signal name=\"crashed\"/>\n"
" </interface>\n"
"")
public:
- CarAdaptor(QObject *parent);
- virtual ~CarAdaptor();
+ CarInterfaceAdaptor(QObject *parent);
+ virtual ~CarInterfaceAdaptor();
public: // PROPERTIES
public Q_SLOTS: // METHODS
diff --git a/examples/dbus/remotecontrolledcar/car/main.cpp b/examples/dbus/remotecontrolledcar/car/main.cpp
index 85b206c..eab82a7 100644
--- a/examples/dbus/remotecontrolledcar/car/main.cpp
+++ b/examples/dbus/remotecontrolledcar/car/main.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "car.h"
-#include "car_adaptor_p.h"
+#include "car_adaptor.h"
#include <QtGui/QApplication>
#include <QtGui/QGraphicsView>
#include <QtGui/QGraphicsScene>
@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
view.resize(400, 300);
view.show();
- new CarAdaptor(car);
+ new CarInterfaceAdaptor(car);
QDBusConnection connection = QDBusConnection::sessionBus();
connection.registerObject("/Car", car);
connection.registerService("com.trolltech.CarExample");
diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
index 01be1bf..21662b4 100644
--- a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
+++ b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
@@ -38,10 +38,10 @@
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -i car_interface.h -p :car_interface.cpp car.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qqdbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** This file may have been hand-edited. Look for HAND-EDIT comments
@@ -49,18 +49,17 @@
**
****************************************************************************/
-#include "car_interface_p.h"
-
+#include "car_interface.h"
/*
- * Implementation of interface class CarInterface
+ * Implementation of interface class ComTrolltechExamplesCarInterfaceInterface
*/
-CarInterface::CarInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+ComTrolltechExamplesCarInterfaceInterface::ComTrolltechExamplesCarInterfaceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
{
}
-CarInterface::~CarInterface()
+ComTrolltechExamplesCarInterfaceInterface::~ComTrolltechExamplesCarInterfaceInterface()
{
}
diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface_p.h b/examples/dbus/remotecontrolledcar/controller/car_interface.h
index 8a5a907..c2d281a 100644
--- a/examples/dbus/remotecontrolledcar/controller/car_interface_p.h
+++ b/examples/dbus/remotecontrolledcar/controller/car_interface.h
@@ -1,17 +1,17 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
+** Commercial Usage
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
@@ -25,31 +25,31 @@
** 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.
+**
** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
** $QT_END_LICENSE$
**
**
-** This file was generated by dbusxml2cpp version 0.6
-** Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml
+** This file was generated by qdbusxml2cpp version 0.7
+** Command line was: qdbusxml2cpp -p car_interface.h: car.xml
**
-** dbusxml2cpp is Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** qdbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** This is an auto-generated file.
** Do not edit! All changes made to it will be lost.
**
****************************************************************************/
-#ifndef CAR_INTERFACE_P_H_1156853585
-#define CAR_INTERFACE_P_H_1156853585
+#ifndef CAR_INTERFACE_H_1264772826
+#define CAR_INTERFACE_H_1264772826
#include <QtCore/QObject>
#include <QtCore/QByteArray>
@@ -63,7 +63,7 @@
/*
* Proxy class for interface com.trolltech.Examples.CarInterface
*/
-class CarInterface: public QDBusAbstractInterface
+class ComTrolltechExamplesCarInterfaceInterface: public QDBusAbstractInterface
{
Q_OBJECT
public:
@@ -71,33 +71,33 @@ public:
{ return "com.trolltech.Examples.CarInterface"; }
public:
- CarInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+ ComTrolltechExamplesCarInterfaceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
- ~CarInterface();
+ ~ComTrolltechExamplesCarInterfaceInterface();
public Q_SLOTS: // METHODS
- inline QDBusReply<void> accelerate()
+ inline QDBusPendingReply<> accelerate()
{
QList<QVariant> argumentList;
- return callWithArgumentList(QDBus::Block, QLatin1String("accelerate"), argumentList);
+ return asyncCallWithArgumentList(QLatin1String("accelerate"), argumentList);
}
- inline QDBusReply<void> decelerate()
+ inline QDBusPendingReply<> decelerate()
{
QList<QVariant> argumentList;
- return callWithArgumentList(QDBus::Block, QLatin1String("decelerate"), argumentList);
+ return asyncCallWithArgumentList(QLatin1String("decelerate"), argumentList);
}
- inline QDBusReply<void> turnLeft()
+ inline QDBusPendingReply<> turnLeft()
{
QList<QVariant> argumentList;
- return callWithArgumentList(QDBus::Block, QLatin1String("turnLeft"), argumentList);
+ return asyncCallWithArgumentList(QLatin1String("turnLeft"), argumentList);
}
- inline QDBusReply<void> turnRight()
+ inline QDBusPendingReply<> turnRight()
{
QList<QVariant> argumentList;
- return callWithArgumentList(QDBus::Block, QLatin1String("turnRight"), argumentList);
+ return asyncCallWithArgumentList(QLatin1String("turnRight"), argumentList);
}
Q_SIGNALS: // SIGNALS
@@ -107,7 +107,7 @@ Q_SIGNALS: // SIGNALS
namespace com {
namespace trolltech {
namespace Examples {
- typedef ::CarInterface CarInterface;
+ typedef ::ComTrolltechExamplesCarInterfaceInterface CarInterface;
}
}
}
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.cpp b/examples/dbus/remotecontrolledcar/controller/controller.cpp
index 00a8875..5fca9e3 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.cpp
+++ b/examples/dbus/remotecontrolledcar/controller/controller.cpp
@@ -42,13 +42,13 @@
#include <QtGui>
#include "controller.h"
-#include "car_interface_p.h"
+#include "car_interface.h"
Controller::Controller(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
- car = new CarInterface("com.trolltech.CarExample", "/Car",
+ car = new com::trolltech::Examples::CarInterface("com.trolltech.CarExample", "/Car",
QDBusConnection::sessionBus(), this);
startTimer(1000);
}
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.h b/examples/dbus/remotecontrolledcar/controller/controller.h
index 07a1355..caadff9 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.h
+++ b/examples/dbus/remotecontrolledcar/controller/controller.h
@@ -43,8 +43,7 @@
#define CONTROLLER_H
#include "ui_controller.h"
-
-class CarInterface;
+#include "car_interface.h"
class Controller : public QWidget
{
@@ -64,7 +63,7 @@ private slots:
private:
Ui::Controller ui;
- CarInterface *car;
+ com::trolltech::Examples::CarInterface *car;
};
#endif
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.pro b/examples/dbus/remotecontrolledcar/controller/controller.pro
index 159e3b1..375b9d7 100644
--- a/examples/dbus/remotecontrolledcar/controller/controller.pro
+++ b/examples/dbus/remotecontrolledcar/controller/controller.pro
@@ -11,7 +11,7 @@ CONFIG += qdbus
# Input
# DBUS_INTERFACES += car.xml
FORMS += controller.ui
-HEADERS += car_interface_p.h controller.h
+HEADERS += car_interface.h controller.h
SOURCES += main.cpp car_interface.cpp controller.cpp
# install
diff --git a/examples/declarative/anchors/anchor-changes.qml b/examples/declarative/anchors/anchor-changes.qml
new file mode 100644
index 0000000..2ebe1c0
--- /dev/null
+++ b/examples/declarative/anchors/anchor-changes.qml
@@ -0,0 +1,46 @@
+import Qt 4.6
+
+Item {
+ id: window
+ width: 200; height: 450
+
+ Rectangle {
+ id: titleBar; color: "Gray"
+ anchors.top: parent.top; height: 50
+ width: parent.width
+ }
+
+ Rectangle {
+ id: statusBar; color: "Gray"
+ height: 50; anchors.bottom: parent.bottom
+ width: parent.width
+ }
+
+ Rectangle {
+ id: content
+ anchors.top: titleBar.bottom; anchors.bottom: statusBar.top
+ width: parent.width
+
+ Text { text: "Top"; anchors.top: parent.top }
+ Text { text: "Bottom"; anchors.bottom: parent.bottom }
+ }
+
+ MouseRegion {
+ anchors.fill: content
+ onPressed: window.state = "FullScreen"
+ onReleased: window.state = ""
+ }
+
+ states : State {
+ name: "FullScreen"
+ //! [0]
+ AnchorChanges {
+ target: content; top: window.top; bottom: window.bottom
+ }
+ //! [0]
+ }
+
+ transitions : Transition {
+ NumberAnimation { matchProperties: "y,height" }
+ }
+}
diff --git a/examples/declarative/animations/color-animation.qml b/examples/declarative/animations/color-animation.qml
new file mode 100644
index 0000000..7171a69
--- /dev/null
+++ b/examples/declarative/animations/color-animation.qml
@@ -0,0 +1,70 @@
+import Qt 4.6
+
+Item {
+ id: window
+ width: 640; height: 480
+
+ // Let's draw the sky...
+ Rectangle {
+ anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter }
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: SequentialAnimation {
+ repeat: true
+ ColorAnimation { from: "DeepSkyBlue"; to: "#0E1533"; duration: 5000 }
+ ColorAnimation { from: "#0E1533"; to: "DeepSkyBlue"; duration: 5000 }
+ }
+ }
+ GradientStop {
+ position: 1.0
+ color: SequentialAnimation {
+ repeat: true
+ ColorAnimation { from: "SkyBlue"; to: "#437284"; duration: 5000 }
+ ColorAnimation { from: "#437284"; to: "SkyBlue"; duration: 5000 }
+ }
+ }
+ }
+ }
+
+ // the sun, moon, and stars
+ Item {
+ width: parent.width; height: 2 * parent.height
+ transformOrigin: Item.Center
+ rotation: NumberAnimation { from: 0; to: 360; duration: 10000; repeat: true }
+ Image {
+ source: "images/sun.png"; y: 10; anchors.horizontalCenter: parent.horizontalCenter
+ transformOrigin: Item.Center; rotation: -3 * parent.rotation
+ }
+ Image {
+ source: "images/moon.png"; y: parent.height - 74; anchors.horizontalCenter: parent.horizontalCenter
+ transformOrigin: Item.Center; rotation: -parent.rotation
+ }
+ Particles {
+ x: 0; y: parent.height/2; width: parent.width; height: parent.height/2
+ source: "images/star.png"; angleDeviation: 360; velocity: 0
+ velocityDeviation: 0; count: parent.width / 10; fadeInDuration: 2800
+ opacity: SequentialAnimation {
+ repeat: true
+ NumberAnimation { from: 0; to: 1; duration: 5000 }
+ NumberAnimation { from: 1; to: 0; duration: 5000 }
+ }
+ }
+ }
+
+ // ...and the ground.
+ Rectangle {
+ anchors { left: parent.left; top: parent.verticalCenter; right: parent.right; bottom: parent.bottom }
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: SequentialAnimation {
+ repeat: true
+ ColorAnimation { from: "ForestGreen"; to: "#001600"; duration: 5000 }
+ ColorAnimation { from: "#001600"; to: "ForestGreen"; duration: 5000 }
+ }
+ }
+ GradientStop { position: 1.0; color: "DarkGreen" }
+ }
+ }
+}
diff --git a/examples/declarative/animations/easing.qml b/examples/declarative/animations/easing.qml
new file mode 100644
index 0000000..a9ba05f
--- /dev/null
+++ b/examples/declarative/animations/easing.qml
@@ -0,0 +1,99 @@
+import Qt 4.6
+
+Rectangle {
+ id: window
+ width: 600; height: 460; color: "#232323"
+
+ ListModel {
+ id: easingTypes
+ ListElement { type: "easeLinear"; ballColor: "DarkRed" }
+ ListElement { type: "easeInQuad"; ballColor: "IndianRed" }
+ ListElement { type: "easeOutQuad"; ballColor: "Salmon" }
+ ListElement { type: "easeInOutQuad"; ballColor: "Tomato" }
+ ListElement { type: "easeOutInQuad"; ballColor: "DarkOrange" }
+ ListElement { type: "easeInCubic"; ballColor: "Gold" }
+ ListElement { type: "easeOutCubic"; ballColor: "Yellow" }
+ ListElement { type: "easeInOutCubic"; ballColor: "PeachPuff" }
+ ListElement { type: "easeOutInCubic"; ballColor: "Thistle" }
+ ListElement { type: "easeInQuart"; ballColor: "Orchid" }
+ ListElement { type: "easeOutQuart"; ballColor: "Purple" }
+ ListElement { type: "easeInOutQuart"; ballColor: "SlateBlue" }
+ ListElement { type: "easeOutInQuart"; ballColor: "Chartreuse" }
+ ListElement { type: "easeInQuint"; ballColor: "LimeGreen" }
+ ListElement { type: "easeOutQuint"; ballColor: "SeaGreen" }
+ ListElement { type: "easeInOutQuint"; ballColor: "DarkGreen" }
+ ListElement { type: "easeOutInQuint"; ballColor: "Olive" }
+ ListElement { type: "easeInSine"; ballColor: "DarkSeaGreen" }
+ ListElement { type: "easeOutSine"; ballColor: "Teal" }
+ ListElement { type: "easeInOutSine"; ballColor: "Turquoise" }
+ ListElement { type: "easeOutInSine"; ballColor: "SteelBlue" }
+ ListElement { type: "easeInExpo"; ballColor: "SkyBlue" }
+ ListElement { type: "easeOutExpo"; ballColor: "RoyalBlue" }
+ ListElement { type: "easeInOutExpo"; ballColor: "MediumBlue" }
+ ListElement { type: "easeOutInExpo"; ballColor: "MidnightBlue" }
+ ListElement { type: "easeInCirc"; ballColor: "CornSilk" }
+ ListElement { type: "easeOutCirc"; ballColor: "Bisque" }
+ ListElement { type: "easeInOutCirc"; ballColor: "RosyBrown" }
+ ListElement { type: "easeOutInCirc"; ballColor: "SandyBrown" }
+ ListElement { type: "easeInElastic"; ballColor: "DarkGoldenRod" }
+ ListElement { type: "easeOutElastic"; ballColor: "Chocolate" }
+ ListElement { type: "easeInOutElastic"; ballColor: "SaddleBrown" }
+ ListElement { type: "easeOutInElastic"; ballColor: "Brown" }
+ ListElement { type: "easeInBack"; ballColor: "Maroon" }
+ ListElement { type: "easeOutBack"; ballColor: "LavenderBlush" }
+ ListElement { type: "easeInOutBack"; ballColor: "MistyRose" }
+ ListElement { type: "easeOutInBack"; ballColor: "Gainsboro" }
+ ListElement { type: "easeOutBounce"; ballColor: "Silver" }
+ ListElement { type: "easeInBounce"; ballColor: "DimGray" }
+ ListElement { type: "easeInOutBounce"; ballColor: "SlateGray" }
+ ListElement { type: "easeOutInBounce"; ballColor: "DarkSlateGray" }
+ }
+
+ Component {
+ id: delegate
+
+ Item {
+ height: 42; width: window.width
+ Text { text: type; anchors.centerIn: parent; color: "White" }
+ Rectangle {
+ id: slot1; color: "#121212"; x: 30; height: 32; width: 32
+ border.color: "#343434"; border.width: 1; radius: 8; anchors.verticalCenter: parent.verticalCenter
+ }
+ Rectangle {
+ id: slot2; color: "#121212"; x: window.width - 62; height: 32; width: 32
+ border.color: "#343434"; border.width: 1; radius: 8; anchors.verticalCenter: parent.verticalCenter
+ }
+ Rectangle {
+ id: rect; x: 30; color: "#454545"
+ border.color: "White"; border.width: 2
+ height: 32; width: 32; radius: 8; anchors.verticalCenter: parent.verticalCenter
+
+ MouseRegion {
+ onClicked: if (rect.state == '') rect.state = "right"; else rect.state = ''
+ anchors.fill: parent
+ }
+
+ states : State {
+ name: "right"
+ PropertyChanges { target: rect; x: window.width - 62; color: ballColor }
+ }
+
+ transitions: Transition {
+ ParallelAnimation {
+ NumberAnimation { matchProperties: "x"; easing: type; duration: 1000 }
+ ColorAnimation { matchProperties: "color"; easing: type; duration: 1000 }
+ }
+ }
+ }
+ }
+ }
+
+ Flickable {
+ anchors.fill: parent; viewportHeight: layout.height
+ Column {
+ id: layout
+ anchors.left: parent.left; anchors.right: parent.right
+ Repeater { model: easingTypes; delegate: delegate }
+ }
+ }
+}
diff --git a/examples/declarative/animations/images/face-smile.png b/examples/declarative/animations/images/face-smile.png
new file mode 100644
index 0000000..3d66d72
--- /dev/null
+++ b/examples/declarative/animations/images/face-smile.png
Binary files differ
diff --git a/examples/declarative/animations/images/moon.png b/examples/declarative/animations/images/moon.png
new file mode 100644
index 0000000..9407b2b
--- /dev/null
+++ b/examples/declarative/animations/images/moon.png
Binary files differ
diff --git a/examples/declarative/animations/images/shadow.png b/examples/declarative/animations/images/shadow.png
new file mode 100644
index 0000000..8270565
--- /dev/null
+++ b/examples/declarative/animations/images/shadow.png
Binary files differ
diff --git a/examples/declarative/animations/images/star.png b/examples/declarative/animations/images/star.png
new file mode 100644
index 0000000..27ef924
--- /dev/null
+++ b/examples/declarative/animations/images/star.png
Binary files differ
diff --git a/examples/declarative/animations/images/sun.png b/examples/declarative/animations/images/sun.png
new file mode 100644
index 0000000..7713ca5
--- /dev/null
+++ b/examples/declarative/animations/images/sun.png
Binary files differ
diff --git a/examples/declarative/animations/property-animation.qml b/examples/declarative/animations/property-animation.qml
new file mode 100644
index 0000000..9f76ee5
--- /dev/null
+++ b/examples/declarative/animations/property-animation.qml
@@ -0,0 +1,64 @@
+import Qt 4.6
+
+Item {
+ id: window
+ width: 320; height: 480
+
+ // Let's draw the sky...
+ Rectangle {
+ anchors { left: parent.left; top: parent.top; right: parent.right; bottom: parent.verticalCenter }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "DeepSkyBlue" }
+ GradientStop { position: 1.0; color: "LightSkyBlue" }
+ }
+ }
+
+ // ...and the ground.
+ Rectangle {
+ anchors { left: parent.left; top: parent.verticalCenter; right: parent.right; bottom: parent.bottom }
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "ForestGreen" }
+ GradientStop { position: 1.0; color: "DarkGreen" }
+ }
+ }
+
+ // The shadow for the smiley face
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "images/shadow.png"; y: smiley.minHeight + 58
+ transformOrigin: Item.Center
+
+ // The scale property depends on the y position of the smiley face.
+ scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight)
+ }
+
+ Image {
+ id: smiley
+ property int maxHeight: window.height / 3
+ property int minHeight: 2 * window.height / 3
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "images/face-smile.png"; y: minHeight
+
+ // Animate the y property. Setting repeat to true makes the
+ // animation repeat indefinitely, otherwise it would only run once.
+ y: SequentialAnimation {
+ repeat: true
+
+ // Move from minHeight to maxHeight in 300ms, using the easeOutExpo easing function
+ NumberAnimation {
+ from: smiley.minHeight; to: smiley.maxHeight
+ easing: "easeOutExpo"; duration: 300
+ }
+
+ // Then move back to minHeight in 1 second, using the easeOutBounce easing function
+ NumberAnimation {
+ from: smiley.maxHeight; to: smiley.minHeight
+ easing: "easeOutBounce"; duration: 1000
+ }
+
+ // Then pause for 500ms
+ PauseAnimation { duration: 500 }
+ }
+ }
+}
diff --git a/examples/declarative/aspectratio/face_fit.qml b/examples/declarative/aspectratio/face_fit.qml
new file mode 100644
index 0000000..482d1b7
--- /dev/null
+++ b/examples/declarative/aspectratio/face_fit.qml
@@ -0,0 +1,25 @@
+import Qt 4.6
+
+// Here, we implement a hybrid of the "scale to fit" and "scale and crop"
+// behaviours which will crop up to 25% from *one* dimension if necessary
+// to fully scale the other. This is a realistic algorithm, for example
+// when the edges of the image contain less vital information than the
+// center - such as a face.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ source: "pics/face.png"
+ x: (parent.width-width*scale)/2
+ y: (parent.height-height*scale)/2
+ scale: Math.max(Math.min(parent.width/width*1.333,parent.height/height),
+ Math.min(parent.width/width,parent.height/height*1.333))
+ }
+}
diff --git a/examples/declarative/aspectratio/face_fit_animated.qml b/examples/declarative/aspectratio/face_fit_animated.qml
new file mode 100644
index 0000000..80a762b
--- /dev/null
+++ b/examples/declarative/aspectratio/face_fit_animated.qml
@@ -0,0 +1,27 @@
+import Qt 4.6
+
+// Here, we extend the "face_fit" example with animation to show how truly
+// diverse and usage-specific behaviours are made possible by NOT putting a
+// hard-coded aspect ratio feature into the Image primitive.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ source: "pics/face.png"
+ x: (parent.width-width*scale)/2
+ y: (parent.height-height*scale)/2
+ scale: SpringFollow {
+ source: Math.max(Math.min(face.parent.width/face.width*1.333,face.parent.height/face.height),
+ Math.min(face.parent.width/face.width,face.parent.height/face.height*1.333))
+ spring: 1
+ damping: 0.05
+ }
+ }
+}
diff --git a/examples/declarative/aspectratio/pics/face.png b/examples/declarative/aspectratio/pics/face.png
new file mode 100644
index 0000000..3d66d72
--- /dev/null
+++ b/examples/declarative/aspectratio/pics/face.png
Binary files differ
diff --git a/examples/declarative/aspectratio/scale_and_crop.qml b/examples/declarative/aspectratio/scale_and_crop.qml
new file mode 100644
index 0000000..283e24b
--- /dev/null
+++ b/examples/declarative/aspectratio/scale_and_crop.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+// Here, we implement "Scale and Crop" behaviour.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ source: "pics/face.png"
+ x: (parent.width-width*scale)/2
+ y: (parent.height-height*scale)/2
+ scale: Math.max(parent.width/width,parent.height/height)
+ }
+}
diff --git a/examples/declarative/aspectratio/scale_and_crop_simple.qml b/examples/declarative/aspectratio/scale_and_crop_simple.qml
new file mode 100644
index 0000000..e720ce7
--- /dev/null
+++ b/examples/declarative/aspectratio/scale_and_crop_simple.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+// Here, we implement "Scale to Fit" behaviour, using the
+// fillMode property.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ source: "pics/face.png"
+ fillMode: Image.PreserveAspectCrop
+ anchors.fill: parent
+ }
+}
diff --git a/examples/declarative/aspectratio/scale_and_sidecrop.qml b/examples/declarative/aspectratio/scale_and_sidecrop.qml
new file mode 100644
index 0000000..c3ef859
--- /dev/null
+++ b/examples/declarative/aspectratio/scale_and_sidecrop.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+// Here, we implement a variant of "Scale and Crop" behaviour, where we
+// crop the sides if necessary to fully fit vertically, but not the reverse.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ source: "pics/face.png"
+ x: (parent.width-width*scale)/2
+ y: (parent.height-height*scale)/2
+ scale: parent.height/height
+ }
+}
diff --git a/examples/declarative/aspectratio/scale_to_fit.qml b/examples/declarative/aspectratio/scale_to_fit.qml
new file mode 100644
index 0000000..961ac04
--- /dev/null
+++ b/examples/declarative/aspectratio/scale_to_fit.qml
@@ -0,0 +1,21 @@
+import Qt 4.6
+
+// Here, we implement "Scale to Fit" behaviour "manually", rather
+// than using the preserveAspect property.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ source: "pics/face.png"
+ x: (parent.width-width*scale)/2
+ y: (parent.height-height*scale)/2
+ scale: Math.min(parent.width/width,parent.height/height)
+ }
+}
diff --git a/examples/declarative/aspectratio/scale_to_fit_simple.qml b/examples/declarative/aspectratio/scale_to_fit_simple.qml
new file mode 100644
index 0000000..7389581
--- /dev/null
+++ b/examples/declarative/aspectratio/scale_to_fit_simple.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+// Here, we implement "Scale to Fit" behaviour, using the
+// fillMode property.
+//
+Rectangle {
+ // default size: whole image, unscaled
+ width: face.width
+ height: face.height
+ color: "gray"
+ clip: true
+
+ Image {
+ id: face
+ smooth: true
+ source: "pics/face.png"
+ fillMode: Image.PreserveAspectFit
+ anchors.fill: parent
+ }
+}
diff --git a/examples/declarative/behaviours/MyRect.qml b/examples/declarative/behaviours/MyRect.qml
new file mode 100644
index 0000000..a272e1f
--- /dev/null
+++ b/examples/declarative/behaviours/MyRect.qml
@@ -0,0 +1,13 @@
+import Qt 4.6
+
+Rectangle {
+ radius: 15
+ border.color: "black"
+ width: 100
+ height: 100
+ id: page
+ MouseRegion {
+ anchors.fill: parent
+ onClicked: { bluerect.parent = page; bluerect.x=0 }
+ }
+}
diff --git a/examples/declarative/behaviours/SideRect.qml b/examples/declarative/behaviours/SideRect.qml
new file mode 100644
index 0000000..c7c7ebf
--- /dev/null
+++ b/examples/declarative/behaviours/SideRect.qml
@@ -0,0 +1,17 @@
+import Qt 4.6
+
+Rectangle {
+ id: myRect
+
+ property string text
+
+ color: "black"
+ width: 75; height: 50
+ radius: 5
+ border.width: 10; border.color: "white";
+ MouseRegion {
+ anchors.fill: parent
+ hoverEnabled: true
+ onEntered: { focusRect.x = myRect.x; focusRect.y = myRect.y; focusRect.text = myRect.text }
+ }
+}
diff --git a/examples/declarative/behaviours/behavior.qml b/examples/declarative/behaviours/behavior.qml
new file mode 100644
index 0000000..2732c0a
--- /dev/null
+++ b/examples/declarative/behaviours/behavior.qml
@@ -0,0 +1,72 @@
+import Qt 4.6
+
+Rectangle {
+ color: "black"
+ width: 400; height: 400
+
+ Rectangle {
+ color: "transparent"
+ anchors.centerIn: parent
+ width: 200; height: 200
+ radius: 30
+ border.width: 10; border.color: "white";
+
+ SideRect {
+ id: leftRect
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.left
+ text: "Left"
+ }
+
+ SideRect {
+ id: rightRect
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.right
+ text: "Right"
+ }
+
+ SideRect {
+ id: topRect
+ anchors.verticalCenter: parent.top
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: "Top"
+ }
+
+ SideRect {
+ id: bottomRect
+ anchors.verticalCenter: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: "Bottom"
+ }
+
+
+ Rectangle {
+ id: focusRect
+
+ property string text
+
+ color: "red"
+ width: 75; height: 50
+ radius: 5
+ border.width: 10; border.color: "white";
+ x: 100-37; y: 100-25
+ x: Behavior { NumberAnimation { duration: 300 } }
+ y: Behavior { NumberAnimation { duration: 300 } }
+ Text {
+ id: focusText
+ text: focusRect.text;
+ text: Behavior {
+ SequentialAnimation {
+ NumberAnimation { target: focusText; property: "opacity"; to: 0; duration: 150 }
+ PropertyAction {}
+ NumberAnimation { target: focusText; property: "opacity"; to: 1; duration: 150 }
+ }
+ }
+ anchors.centerIn: parent;
+ color: "white";
+ font.pixelSize: 16
+ font.bold: true
+ }
+ }
+ }
+}
diff --git a/examples/declarative/behaviours/test.qml b/examples/declarative/behaviours/test.qml
new file mode 100644
index 0000000..1869c45
--- /dev/null
+++ b/examples/declarative/behaviours/test.qml
@@ -0,0 +1,100 @@
+import Qt 4.6
+
+Rectangle {
+ color: "lightsteelblue"
+ width: 800
+ height: 600
+ id: page
+ MouseRegion {
+ anchors.fill: parent
+ onClicked: { bluerect.parent = page; console.log(mouseX); bluerect.x = mouseX; }
+ }
+ MyRect {
+ color: "green"
+ x: 200
+ y: 200
+ }
+ MyRect {
+ color: "red"
+ x: 400
+ y: 200
+ }
+ MyRect {
+ color: "yellow"
+ x: 400
+ y: 400
+ }
+ MyRect {
+ color: "orange"
+ x: 400
+ y: 500
+ }
+ MyRect {
+ color: "pink"
+ x: 400
+ y: 0
+ }
+ MyRect {
+ color: "lightsteelblue"
+ x: 100
+ y: 500
+ }
+ MyRect {
+ color: "black"
+ x: 0
+ y: 200
+ }
+ MyRect {
+ color: "white"
+ x: 400
+ y: 0
+ }
+ Rectangle {
+ color: "blue"
+ x: 0
+ y: 0
+ width: 100
+ height: 100
+ id: bluerect
+ x: Behavior {
+ ParallelAnimation {
+ SequentialAnimation {
+ NumberAnimation {
+ target: bluerect
+ property: "y"
+ from: 0
+ to: 10
+ easing: "easeOutBounce(amplitude:30)"
+ duration: 250
+ }
+ NumberAnimation {
+ target: bluerect
+ property: "y"
+ from: 10
+ to: 0
+ easing: "easeOutBounce(amplitude:30)"
+ duration: 250
+ }
+ }
+ NumberAnimation { duration: 500 }
+ }
+ }
+ parent: Behavior {
+ SequentialAnimation {
+ NumberAnimation {
+ target: bluerect
+ property: "opacity"
+ to: 0
+ duration: 150
+ }
+ PropertyAction {}
+ NumberAnimation {
+ target: bluerect
+ property: "opacity"
+ to: 1
+ duration: 150
+ }
+ }
+ }
+ }
+}
diff --git a/examples/declarative/border-image/animated.qml b/examples/declarative/border-image/animated.qml
new file mode 100644
index 0000000..29c02b3
--- /dev/null
+++ b/examples/declarative/border-image/animated.qml
@@ -0,0 +1,55 @@
+import Qt 4.6
+import "content"
+
+Rectangle {
+ id: page
+ color: "white"
+ width: 1030; height: 540
+
+ MyBorderImage {
+ x: 20; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ }
+ MyBorderImage {
+ x: 270; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 520; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 770; y: 20; minWidth: 120; maxWidth: 240
+ minHeight: 120; maxHeight: 240
+ source: "content/colors.png"; margin: 30
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ }
+ MyBorderImage {
+ x: 20; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ }
+ MyBorderImage {
+ x: 270; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 520; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
+ }
+ MyBorderImage {
+ x: 770; y: 280; minWidth: 60; maxWidth: 200
+ minHeight: 40; maxHeight: 200
+ source: "content/bw.png"; margin: 10
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
+ }
+}
diff --git a/examples/declarative/border-image/borders.qml b/examples/declarative/border-image/borders.qml
new file mode 100644
index 0000000..9879416
--- /dev/null
+++ b/examples/declarative/border-image/borders.qml
@@ -0,0 +1,18 @@
+import Qt 4.6
+
+Rectangle {
+ id: page
+ color: "white"
+ width: 520; height: 280
+
+ BorderImage {
+ x: 20; y: 20; width: 230; height: 240
+ smooth: true
+ source: "content/colors-stretch.sci"
+ }
+ BorderImage {
+ x: 270; y: 20; width: 230; height: 240
+ smooth: true
+ source: "content/colors-round.sci"
+ }
+}
diff --git a/examples/declarative/border-image/content/MyBorderImage.qml b/examples/declarative/border-image/content/MyBorderImage.qml
new file mode 100644