/****************************************************************************
**
** Copyright (C) 2020 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 qtquickstudio-logichelper-overview.html

    \title Qt Quick Studio Logic Helper Overview

    With QML, application building blocks such as UI components and controls
    are declared and various properties set to define the application behavior.
    Application behavior can be further scripted through JavaScript, which is
    a subset of the language.

    To make scripting application behavior easier for designers, \QDS provides
    a set of invisible types called \e QtQuick.Studio.LogicHelper. They can be
    imported to projects to make them available in the \QDS \uicontrol Library
    view in the \uicontrol {Studio Logic Helper} tab.

    \image studio-logic-helpers.png "Logic Helper types in Library"

    Logic helpers are available for binding property values using the boolean
    AND, NOT, and OR operators, as well as for mapping numbers and numerical
    ranges. In addition, you can synchronize the property values of two
    components bi-directionally.

    Logic helpers can be used in connection with \l {Qt Quick Controls} types,
    such as a \l Slider or \l CheckBox.

    \section1 Boolean Helpers

    You can use logic helpers to bind property values using the boolean AND, OR,
    and NOT operators. The \l AndOperator type evaluates two boolean inputs. The
    output is evaluated as \c true if both inputs are evaluated as \c true.

    The \l OrOperator type does the same as the AndOperator, but the output is
    evaluated as \c true if one input or both inputs are evaluated as \c true.

    The \l NotOperator type evaluates the input. The output is evaluated
    as \c true if the input is evaluated as \c false.

    \section1 Bi-directional Bindings

    The \l BidirectionalBinding type binds the values of two controls
    together, so that when one value is changed, the other one follows it.
    This type could be used to synchronize two sliders or a slider and checkbox.
    Typically, it is used to bind a backend value to a control, such as a
    slider.

    A \l StringMapper type can be used to add a text property that displays the
    value.

    \section1 Mappers

    The \l StringMapper type maps numbers to strings. The string mapper input
    is bound to the value of a control that provides the number and the text
    property of the string mapper is mapped to the text property of type
    that displays the string.

    The \l MinMaxMapper type has output values even if the input value is out
    of range or too small or big. This enables applying actions to values
    even if they are out of range, such as changing a color in a state.
    To access the values of a control, the input of the MinMaxMapper is bound
    to the value of a control. The other MinMaxMapper properties indicate
    whether the input property is out of range.

    The \l RangeMapper type maps a numerical range to another range, so that
    the output value of the second range follows that of the original range.
    The original value, as well as the minimum and maximum input and output
    values are specified as values of RangeMapper properties.
*/
