Commit Graph

44 Commits

Author SHA1 Message Date
Eskil Abrahamsen Blomfeldt cb907fc47a Move Qt Quick Shapes examples back under Qt Quick
In order to be accessible from Qt Creator, the modules either has
to have a separate landing page and qdocconf, or we need it under
the same subdirectory as everything else. We currently want
Qt Quick Shapes to be like Qt Quick Particles and be documented
as part of Qt Quick, so the examples move back into a quickshapes/
subdirectory of examples/quick (like with examples/quick/particles/)

Pick-to: 6.7
Change-Id: Ib7aaa75da7c4c9eeca6edb5ede7952598f37df89
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-02-01 21:42:00 +01:00
Eskil Abrahamsen Blomfeldt 5e8314f472 Move Qt Quick Shapes example
Usually, we have separate top-level example directories for
different modules, but since Qt Quick Shapes only had a single
example, it was categorized under examples/quick.

We now plan to add more, so to prepare for that, this sets up
the normal structure with an examples/quickshapes directory.

Pick-to: 6.7
Change-Id: I50016358b674c18bb2930459d4e0111862ddcedb
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-01-06 11:19:17 +01:00
Lucie Gérard 8dc2e3daf0 Move undocumented quick examples to manual tests
- maskedmousearea ought to be redone with input handlers
- delegatechooser needs a realistic use case, not so ugly
- itemparticle hasn't been in working condition for some time,
  due to its use of flickr API
- keep FlickrRssModel only in manual tests (broken for now)
- remove bogus copies of flipable example files from the
  delegatemodel example which were added in
  1fef24732b
- copy shared components that examples tend to depend on
  into a shared directory for manual tests

Task-number: QTBUG-88470
Task-number: QTBUG-119117
Change-Id: Ide1918f5e1b6fcc3efd939825892bfd270cef586
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-11-28 17:57:05 -07:00
Oliver Eftevaag 38d6028ad1 Merge externaldraganddrop example into the draganddrop example
We have two examples that are both showcasing different drag and drop
features.

Might as well only have one.

Pick-to: 6.6
Change-Id: I9d984f723f42aaf39c5632e58fc376ad0df18acb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-07-04 06:54:09 +02:00
Oliver Eftevaag 38373b81f3 convert threading example to manual tests
The threading example used a LauncherList to combine
two different but related examples into one.

I've now separated both into a shared directory called
'threading'

Pick-to: 6.6
Change-Id: Iee8898e61adcf69dc67157a1eff5f6ac019a39ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-07-04 00:18:47 +02:00
Oliver Eftevaag dba7d84843 move righttoleft example to manual test, and revamp it
The patch makes the following changes to the example:
- It fixes all qmllint warnings.
- It translates all user-facing strings.
- It reorders some properties.
- It removes the Loaders in layoutdirection.qml
- It also does some other things,
  like removing unused lines of code, etc.

Pick-to: 6.5 6.6
Change-Id: I798db60a2bf2d87c64b68947588585d10ba4015d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2023-07-03 10:57:51 +02:00
Shawn Rutledge 1fc968c513 Move touchinteraction examples to pointerhandlers and manual test
These are getting long in the tooth, but multiflame and corkboards seem
worthwhile to update to use Pointer Handlers (as we could have done
sometime during the last 5 years or so).

The qrc prefix seems to have changed: let's get the qmake build
working again.

The multiflame example is mostly rewritten:
- all in one file, which can run standalone
- only one ParticleSystem instance (which hopefully is more efficient)
- using an inline component
- less boilerplate per component instance (only one property for
  ColoredEmitter, which is both its color and its group name)
- less-extreme, more fire-like colors

The version of corkboards in Qt Quick 3D was already updated (and then
removed for unrelated reasons); now we have the fixes from
0227fcdf3ea82efee3005d99fd1019410a7f5789

BearWhack has nice graphics, but doesn't seem like a very nice use of
multi-touch, so it's demoted to the touch manual test for now.
The simple Flickable use cases seem underwhelming nowadays too, and
we have snippets as simple as those.

Replace mentions of touchinteraction for testing with pointerhandlers.

Pick-to: 6.6
Change-Id: I4667e13e961ca6f84d3336505b3c673790babfa5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-07-02 21:43:46 +02:00
Jan Arve Sæther 90a5e8d217 Introduction of LayoutItemProxy
The LayoutItemProxy is a proxy for an arbitrary QuickItem that is
intended to be used in Layouts. This allows to position a QuickItem
in multiple layouts to build responsive layouts.

[ChangeLog][Layouts] Added LayoutItemProxy, a helper item for writing
responsive layouts.

Task-number: QTBUG-71153
Change-Id: Ief2bdbf44b3b346157ce2c71a313cc1e132f49ac
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-06-02 14:39:23 +02:00
Kaj Grönholm fc0d469718 Add QtQuick.Effects & MultiEffect
Add new QtQuick.Effects plugin for post-processing effects.
The plan is to add essential effects directly into QtQuick,
not to duplicate Qt Graphical Effects.

Initially the plugin will contain MultiEffect which supports
7 different effects in a single ShaderEffect (brightness,
contrast, saturation, colorize, blur, shadow, mask). Combining
multiple effects into a single shader is more performant than
chaining multiple effect items. Depending on used features,
the most optimal shader gets selected.

Includes two examples demonstrating the usage of MultiEffect.

Task-number: QTBUG-106651
Change-Id: I35865030fd4b7a1f657146cee03b195451545bc6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-12-07 08:31:43 +02:00
Kristoffer Skau 7fe4c9bb27 Add live property to QQuickItem layer
QQuickItemLayer now has a live property that can be set to determine if
its contents should change whenever the item updates. This enables
variable refresh rate for quick items.

[ChangeLog] Added live property to QQuickItem layer.

Fixes: QTBUG-77343
Change-Id: I8bf7e7af4cfed6deef2253d346bb0b72d0fef66e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-09-08 16:46:55 +02:00
Laszlo Agocs afd6c6b905 Remove textureprovider example
Task-number: QTBUG-83978
Change-Id: I8f26ae18dd09209cc1d6bee6e5f0b2f609ec667c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-06 11:22:20 +02:00
Paolo Angelelli 607ced5bfd Allow DelegateModel-based views to support multiple delegate types
This patch adds a specific abstract QQmlComponent subclass,
QQmlAbstractDelegateComponent, and a default implementation,
DelegateChooser, that, together with the type DelegateChoice
allows determining the delegate type by role and/or index.

The patch also adds QQmlAbstractDelegateComponent support
to QQmlTableInstanceModel, that is a simplified version of
the delegate model, currently only used in the new table view.

DelegateChoosers are intended to behave just like Components
in the context of the view. This means that they can be declared
outside of the view, and also in separate files, and the same
delegate component can be used at the same time in multiple views.

[ChangeLog][QtQuick][Item Views] Added a DelegateChooser Component
to host DelegateChoice instances to choose different delegates in
an Item View (e.g. TableView) depending on model roles.

Done-with: Michael Brasser <michael.brasser@live.com>
Task-number: QTBUG-26681
Change-Id: Ibe24a31daf9142c8a9ff45ef6c65da0aec8a14dc
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-17 13:17:28 +00:00
Michael Winkelmann ad0f200df5 Make a subdirectory for TableView examples
This makes more room for more tableview examples.
I also added the tableview directory to the quick.pro subdirs.

Change-Id: Ia136150ded99c2ec627e122aa676e24a519683a9
Reviewed-by: hjk <hjk@qt.io>
2018-07-13 15:25:45 +00:00
Frederik Gladhorn fa3c840ef1 Move demos to qtdoc repository
These demos use several modules and moving them allows to use for
example Qt Quick Controls 2 in them.

Change-Id: I1f352671dec672665e9fdb6a9c2a7c6e25a002b0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-07-12 20:23:24 +00:00
Liang Qi 0d3592aa7f Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I75b0099b2b9ebb5cfb6f07b43b90b598743ae033
2017-10-04 10:41:55 +02:00
Allan Sandfeld Jensen fa52bb665d Fix no-opengl builds
The qquickwidgets examples uses OpenGL directly

Change-Id: I1cc8cfbcf249abc98473287a9d499032232828c7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-09-25 16:58:13 +00:00
Laszlo Agocs 961da5273e Rename to Shape/ShapePath and remove public JS API
Change-Id: I299354da0632fb0b8487cfb13748ed58b97d75fd
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-06-02 10:16:52 +00:00
Laszlo Agocs e2520ff76b Move PathItem to qt.labs
Change-Id: I1cd686cff60bd40fe2cbbc34f917fac7835b6b7d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
2017-04-25 13:03:28 +00:00
Lars Knoll be846890f3 Adjust decarative after qtConfig changes in qtbase
Most of the changes are optional, but cleanup our QT_CONFIG
usage.

Change-Id: I5253d53f72f6fb03c2cfedae1e17d94f424a6bbb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-08-19 11:16:18 +00:00
Andy Nichols 0669e48a2f Only build textureprovider example when OpenGL is available
Change-Id: Ia4bae77ff66babb6eb8ff8c818bb5f842244ccc9
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-06-01 11:56:24 +00:00
Laszlo Agocs 0837453ef9 Merge remote-tracking branch 'origin/dev' into HEAD
Change-Id: If91e0e28d004f1db978dcab393f189743bb69cd5
2016-05-24 21:50:29 +02:00
Liang Qi 63ec33e79c Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
	src/qml/jsruntime/qv4engine.cpp
	src/qml/jsruntime/qv4engine_p.h

Change-Id: I89ffccd699bee675732758d039e22224b275d60d
2016-05-19 20:41:34 +02:00
Oswald Buddenhagen fc3317caab actually build the textureprovider example
Change-Id: Idef70d65e6871fa995e680565424056c4caf4411
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-05-13 04:35:31 +00:00
Andy Nichols 53c5398529 Fix building with QT_NO_OPENGL defined
Change-Id: Ice6c47f766899e7313b9dde8cfcd6d81eeaf52f5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-05-06 19:17:20 +00:00
Jan Arve Saether 974643829f Move QtQuick.Layouts to qtdeclarative from qtquickcontrols
This is in order for it to be available without having to install
Qt Quick Controls

Change-Id: I3f0d0dc108829947cd189b7861944e556e00cef3
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2016-02-26 13:18:27 +00:00
Albert Astals Cid f9c1b6e9c7 Add QQuickAsyncImageProvider
It allows for providers to implement threading on their side

Change-Id: I34042b213ce7697a3e39470387357d733e15723c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-03-26 12:45:21 +00:00
Laszlo Agocs 745a71196c Make QQuickRenderControl public
QQuickRenderControl allows rendering Qt Quick 2 scenes into framebuffer
objects which can then be used in arbitrary ways in Qt-based or 3rd party
OpenGL renderers.

[ChangeLog][QtQuick] Introduced QQuickRenderControl as a public API.

Task-number: QTBUG-37944
Change-Id: I84262243b261b35cefdf67ec6bba8127a0f29275
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-06-24 14:22:19 +02:00
Zhang Xingtao f0ecb4c1fa Add dependency check for quickwidgets
If not, there will be an error when building with -no-opengl option:
"Project ERROR: Unknown module(s) in QT: quick-private"
The quickwidgets module depends on qt quick module, and qt quick
module depends on opengl.

Change-Id: If74b5582bdd96ed19ec10dbc534d02146717bc08
Reviewed-by: Liang Qi <liang.qi@digia.com>
2014-04-29 15:14:02 +02:00
Topi Reinio 5b0935a105 Move Qt Quick Widgets example and document it
Because QtQuickWidgets is part of Qt Quick module documentation,
its examples need to also be moved under the examples/quick
directory structure.

This change moves the example, creates minimal documentation
for it, and adds a link to it from the QQuickWidget class
reference.

Task-number: QTBUG-37272
Change-Id: Iffb67849f150b9aaf0edaef5852364e93f7752b8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-03-14 09:25:31 +01:00
Simon Hausmann 7c9497a6d4 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/qml/compiler/qv4ssa.cpp
	src/qml/jsruntime/qv4arrayobject.cpp
	src/qml/jsruntime/qv4context.cpp

Change-Id: Ied5b23bec4dc14abe51127c507aed668f855c1e1
2014-02-11 12:00:31 +01:00
Sze Howe Koh c160190a6f Doc: Merge duplicated example directories
examples/quick/customitems contains all the examples found in
examples/quick/ui-components, plus 2 more (maskedmousearea and
painteditem). There are some very minor differences between the
duplicated files, regarding the "smooth" property. Apart from that, the
examples are identical.

The only file that is unique to examples/quick/ui-components is
example-slideswitch.qdoc. Moving it does not change the generated HTML
filename. The other examples do not produce any documentation.

Change-Id: I507d9064a60fd1f3a1469c1e423d4c0a72c7dc41
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-02-06 23:31:47 +01:00
Shawn Rutledge 34793538fb remove QtQuick.Dialogs and related modules
They are being moved to the QtQuick Controls repository (see change
ba9ba084124403bd8930e29d8afcea9d64b6c0b6 in qtquickcontrols).
This makes it possible to use QtQuick Controls in the implementation.

[ChangeLog][QtQuick][Dialogs]Moved dialog implementations from
qtdeclarative module to qtquickcontrols module due to dependencies

Change-Id: I76d5b71b185dd14a188ea68f18bfec61b4bf2f41
Reviewed-by: Liang Qi <liang.qi@digia.com>
2014-01-07 14:40:00 +01:00
Chris Meyer 391459210d Add support for external drag and drop in Quick items.
Add dragType enums with values of None, Automatic, Internal (default).
Setting to Automatic allows startDrag to be called automatically.
Setting to Internal (default) retains old behavior.

Add mimeData to Drag item to enable external drags.

Call startDrag to start drag manually or change from internal drag to
external drag. Added events dragStarted and dragFinished that get
invoked from startDrag.

Mime data must be specified in the mimeData property as
mime-type / data pairs.

Moved QQuickDrag from qquickmousearea* files to qquickdrag* files to
reduce header interdependencies that caused linking errors in other
modules and also to improve code organization.

Allow DropArea to receive and process external data.

Introduced new variable containsDrag to QQuickDropAreaPrivate. This
replaces mimeData which was previously being used to determine if a
drop operation was currently occurring. The problem was that mimeData
was being externally destructed.

Also introduced accessor methods for getting color, html, image, text,
and urls out of the drop. This facilitates dropping of external data of
those types onto a DropArea.

Added example quick/externaldraganddrop.

Task-number: QTBUG-27498
Change-Id: I1420df7c161ea3399e49a23305273e106baa246f
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
2013-09-09 22:58:45 +02:00
Jerome Pasion 6cd8b68300 Doc: Renamed accessibility example to "quick-accessibility".
-Generated HTML file name conflicted with accessibility group.

Task-number: QTBUG-32580
Change-Id: I5f5a4bb8134268c58105ea61d5ae3bbdd35c0d50
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-08-13 14:52:27 +02:00
Shawn Rutledge 4348452855 Package dialogs examples into a single executable
Introduced tabs and added the C++ boilerplate launcher.

Change-Id: Ibb49a182e3928aba5dced097d5307eb7d1f4b42d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-05-28 10:08:51 +02:00
Gunnar Sletta d483a1bbaf Added an example of the window container embedding a QQuickView
Change-Id: I451716f4a0eac2020835a9e8a0d67626b981c736
Reviewed-by: Alan Alpert <aalpert@rim.com>
2013-01-25 23:22:52 +01:00
Alan Alpert eb6199da86 Move examples around
imageprovider is a QtQuick example. Models and Views examples are now split up,
as one is a collection of C++ examples and the other is banded into a single
QML example.

Task-Number: QTBUG-24133
Change-Id: I81874871bd69ffef6a88df84f3d3f649e0c56bc6
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-11 00:42:36 +01:00
Oswald Buddenhagen a6065d60f1 centralize and fixup example sources install targets
follow respective change in qtbase

Change-Id: I27502eb7ebea973e19ec5f7c3ec0e2338556f6e0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
2012-12-10 18:16:48 +01:00
Christian Kandeler aba67cc3f0 Fix installation of examples.
Enable examples to be built in the target tree. This entails installing
the project files and possibly other missing stuff.
Task-number: QTBUG-27977

Change-Id: I159fd8e3ebc7077e1d68e085c4947acc058ce594
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-22 14:10:05 +01:00
Gunnar Sletta 3ddf7f1cf6 Three scene graph examples with docs.
How to make a custom QSGGeometry, how to use QSGSimpleMaterial and how
to use render with raw GL.

Change-Id: I3e5a32b6ae12d7d781c11050ed26a54845e92cca
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-08-13 15:06:46 +02:00
Alan Alpert 0f04787ffb More consistent examples directory structure
Under examples the next directory level distinguishes imports/modules
and the next directory level distinguishes examples.

Change-Id: Icabadaac6ccb9c1c424efa9c9e64a7d94bc7c0da
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-08-10 08:56:59 +02:00
Alan Alpert e09e6d2bc0 Uncomment examples in pro file
Examples all seem to build and install fine, and no task number was
mentioned in the pro file.

Change-Id: Ie836385683287467618749456247684456721866
Reviewed-by: Bea Lam <bea.lam@nokia.com>
2012-08-09 00:23:41 +02:00
Andrew den Exter 793a01d28f Update model view examples to common launcher format.
Change-Id: I8dc30a9ade3cbbfa91d51d85617975ad7d46ee15
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2012-03-22 02:50:37 +01:00
Matthew Vogt 0284817d6c Merge master <-> api_changes
Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
2012-03-05 11:39:54 +10:00