// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
    \title Qt Quick Examples - Touch Interaction
    \example touchinteraction
    \brief A collection of QML Touch Interaction examples.
    \image qml-touchinteraction-example.png

    \e{Touch Interaction} is a collection of small QML examples relating to
    touch interaction methods. For more information, visit
    \l{Important Concepts In Qt Quick - User Input}.

    \include examples-run.qdocinc

    \section1 Multipoint Flames Example

    \e{Multipoint Flames} demonstrates distinguishing different fingers in a
    \l MultiPointTouchArea, by assigning a different colored flame to each touch
    point.

    The MultipointTouchArea sets up multiple touch points:
    \snippet touchinteraction/multipointtouch/multiflame.qml 0

    The flames are then simply bound to the coordinates of the touch point, and
    whether it is currently pressed, as follows:
    \snippet touchinteraction/multipointtouch/multiflame.qml 1

    \section1 Bear-Whack Example

    \e{Bear-Whack} demonstrates using \l MultiPointTouchArea to add multiple
    finger support to a simple game. The interaction with the game
    is done through a SpriteGoal that follows the TouchPoint. The TouchPoints
    added to the MultiPointTouchArea are a component with the relevant logic
    embedded into it:
    \snippet touchinteraction/multipointtouch/AugmentedTouchPoint.qml 0

    \section1 Flick Resize Example

    \e{Flick Resize} uses a \l PinchArea to implement a \e{pinch-to-resize}
    behavior. This is easily achieved by listening to the PinchArea signals and
    responding to user input.
    \snippet touchinteraction/pincharea/flickresize.qml 0

    \section1 Flickable Example

    \e Flickable is a simple example demonstrating the \l Flickable type.
    \snippet touchinteraction/flickable/basic-flickable.qml 0

    \section1 Corkboards Example

    \e Corkboards shows another use for \l Flickable, with QML types within the
    flickable object that respond to mouse and keyboard interaction. This
    behavior does not require special code as the Qt Quick types already
    cooperate with the Flickable type for accepting touch events.
*/
