/****************************************************************************
**
** 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$
**
****************************************************************************/

/*!
    \example calculator-qml
    \title Qt SCXML Calculator QML Example
    \ingroup examples-qtscxml

    \image calculator-qml.png

    \brief A Qt Quick application that implements the Calculator example
    presented in the SCXML Specification.

    \e {Calculator} uses Qt SCXML to implement the
    \l{SCXML Specification - Calculator Example}{Calculator Example}
    presented in the SCXML Specification.

    The state machine is specified in the \e statemachine.scxml file and
    compiled into the \c CalculatorStateMachine class. The user interface is
    created using Qt Quick.

    \include examples-run.qdocinc

    \include calculator-compiling.qdocinc

    \section1 Instantiating the State Machine

    We make the generated \c CalculatorStateMachine class available to QML by
    registering it as a QML type in the \e calculator-qml.cpp file:

    \quotefromfile calculator-qml/calculator-qml.cpp
    \skipto statemachine.h
    \printuntil }

    To use the CalculatorStateMachine type in a QML file, we import it:

    \quotefromfile calculator-qml/calculator-qml.qml
    \skipto CalculatorStateMachine
    \printline 1.0

    We instantiate a CalculatorStateMachine and listen to the \c updateDisplay
    event. When it occurs, we change the text on the calculator display:

    \skipto  CalculatorStateMachine {
    \printuntil /^ {4}\}/

    When users press the calculator buttons, the buttons submit events to the
    state machine:

    \skipto DIGIT.
    \skipto Button
    \printuntil }
*/
