diff options
Diffstat (limited to 'src/charts/doc/src/examples-qmlweather.qdoc')
-rw-r--r-- | src/charts/doc/src/examples-qmlweather.qdoc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/charts/doc/src/examples-qmlweather.qdoc b/src/charts/doc/src/examples-qmlweather.qdoc new file mode 100644 index 00000000..87e9010b --- /dev/null +++ b/src/charts/doc/src/examples-qmlweather.qdoc @@ -0,0 +1,34 @@ +/*! + \example qmlweather + \title Qml Weather + \ingroup qtcharts_examples + + \image examples_qmlweather.png + + \brief This is a basic demonstration showing how to use the different chart types by using qml. + + By default the application uses static test data to mimic a weather forecast. You can also + obtain an application id from http://www.worldweatheronline.com/ to get access to weather API + provided by World Weather Online. You can then give your application id as a parameter to the + Qml Weather executable to make it use live data. + + For example: + \code + bin\qmlweather.exe 1234567890abcdef123456 + \endcode + + The example application uses a ChartView and a some series to visualize weather data: + \snippet qmlweather/qml/qmlweather/main.qml 1 + \snippet qmlweather/qml/qmlweather/main.qml 2 + + To get data with weather forecast data, we make an HTTP GET request to World Weather Online. We + request the response in JSON data format. + \snippet qmlweather/qml/qmlweather/main.qml 3 + + The JSON response contains an array of forecast data: + \snippet qmlweather/qml/qmlweather/main.qml 4 + + That is then used as input data for our series and a ListModel we use as a container for weather + icon URLs: + \snippet qmlweather/qml/qmlweather/main.qml 5 +*/ |