// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \example qmloscilloscope
    \title Qml Oscilloscope
    \ingroup qtcharts_examples
    \examplecategory {Data Visualization}
    \image examples_qmloscilloscope.png {Screenshot showing an oscilloscope application displaying
           waves of two different signals, signal one is green and signal two is blue. On the left
           side are options to change the graph and source, as well as choosing how many samples
           and refresh rate, and also buttons to turn on and off antialiasing or animations}

    \brief The example shows how to implement application with strict performance requirements
    using the Qt Charts QML API.

    The oscilloscope application demonstrates how to use the Qt Charts QML API to implement an
    application with strict performance requirements. The application uses generated data with
    configurable characteristics to mimic a simple oscilloscope user interface.

    To get information about actual rendering speed shown in the application output console, you can
    set QSG_RENDER_TIMING = 1 to your run environment settings. To do so go to Projects - Run -
    Run environment in Qt Creator and select Add. Then you can experiment with the different
    configurable options of the example application to find the configuration that gives you the
    best performance in your environment.

    \include examples-run.qdocinc

    \section1 Creating Views

    The application window is shared by control and scope views:
    \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 1
    \dots
    \snippet qmloscilloscope/qml/qmloscilloscope/main.qml 2

    ControlView implements the buttons used for configuring. ScopeView uses a ChartView to show
    a chart with two line series:
    \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 1
    \dots

    The data of the line series is updated with a QML timer. In a real life application the
    updating could be triggered with a signal from Qt C++ code.
    \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 2

    The oscilloscope also allows you to switch the type of the series used for visualizing the
    signal sources. This is implemented by dynamically destroying and creating series:
    \snippet qmloscilloscope/qml/qmloscilloscope/ScopeView.qml 3

*/
