/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\page qtquick-usecase-animations.html
\title Use case - Animations In QML
\brief Example of how to include animations in QML applications

\l {Qt Quick} provides the ability to animate properties. Animating properties allows property values to move through
intermediate values instead of immediately changing to the target value. To animate the position of an item, you can
animate the properties that control the item's position, x and y for example, so that the item's position
changes each frame on the way to the target position.

\section1 Fluid UIs

QML was designed to facilitate the creation of fluid UIs. These are user interfaces where the UI components animate instead of appearing, disappearing, or jumping abruptly. Qt Quick provides two simple ways to have UI
components move with animation instead of instantly appearing at their new location.

\section2 States and Transitions

Qt Quick allows you to declare various UI states in \l State objects. These states are comprised of property changes from a
base state, and can be a useful way of organizing your UI logic. Transitions are objects you can associate with an item
to define how its properties will animate when they change due to a state change.

States and transitions for an item can be declared with the \l Item::states and \l Item::transitions properties.
States are declared inside the states list property of an item, usually the root item of the component. Transitions
defined on the same item are used to animate the changes in the state. Here is an example.

\snippet qmlapp/usecases/animations.qml states

\section2 Animating Property Changes.

Behaviors can be used to specify an animation for a property to use when it changes. This is then applied to all
changes, regardless of their source. The following example animates a button moving around the
screen using behaviors.

\snippet qmlapp/usecases/animations.qml behave

\section1 Other Animations

Not all animations have to be tied to a specific property or state. You can also create animations more generally, and
specify target items and properties inside the animation. Here are some examples of different ways to do this:

\snippet qmlapp/usecases/animations.qml constant
\snippet qmlapp/usecases/animations.qml scripted
\image qmlapp/qml-uses-animation.png

More information about animations can be found on the \l{Important Concepts in Qt Quick - States, Transitions and
Animations} page.
*/
