diff options
author | Venu <venugopal.shivashankar@digia.com> | 2014-09-02 14:54:28 +0200 |
---|---|---|
committer | Venugopal Shivashankar <venugopal.shivashankar@digia.com> | 2014-09-11 12:02:58 +0200 |
commit | 7ddb567f7cced8beed147c42b8c79fc017d260ee (patch) | |
tree | 7bf43749272ae8d5b1ba5152233e8432327bd5b3 /examples | |
parent | 1de6e7b8e0ee465f642e1b2f5a14611e52a7e8c2 (diff) |
Doc: Added a bit more detail about the example
Task-number: QTBUG-37203
Change-Id: I62664b5dd0041cf8ba210dc3f0375793f7c72a00
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quick/demos/stocqt/doc/src/stocqt.qdoc | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/examples/quick/demos/stocqt/doc/src/stocqt.qdoc b/examples/quick/demos/stocqt/doc/src/stocqt.qdoc index 5f090e84f9..5e5ba3caf5 100644 --- a/examples/quick/demos/stocqt/doc/src/stocqt.qdoc +++ b/examples/quick/demos/stocqt/doc/src/stocqt.qdoc @@ -32,8 +32,53 @@ \brief A configurable stock chart for the NASDAQ-100. \image qtquick-demo-stocqt.png - \e{StocQt} demonstrates various QML and \l{Qt Quick} features such as - displaying custom components and downloading data from the internet. + The \e{StocQt} application presents a trend chart for the first stock in + the list of NASDAQ-100 stocks maintained by it. It allows the user to + choose another stock from the list, and fetches the required data for + the selected stock by sending an \c XMLHttpRequest to + http://finance.yahoo.com. + + The application uses several custom types such as Button, CheckBox, + StockChart, StockInfo, StockView, and so on. These types are used to + present the stock data in a readable form and also let the user customize + the trend chart. For example, the user can choose to view the yearly, + monthly, or daily trends in the stock price. + + The application uses the ObjectModel type to access the two visual data + models that it depends on. + + \quotefromfile demos/stocqt/stocqt.qml + \skipto ListView + \printuntil id + \dots 8 + \skipto model + \printuntil StockView + \printuntil } + \printuntil } + \printuntil } + + The StockListView model is a static data model listing the + NASDAQ-100 stocks with basic information such as stockId, name, value, + change, and so on. This data model is used by the application if the + user wants to choose another stock from the list. + + StockView is a complex data model that presents a trend chart for the + selected stock. It uses another custom type, StockChart, which presents + the graphical trend of the stock price using a Canvas. This data model + is used for most of the time during the lifetime of the application. + + \quotefromfile demos/stocqt/content/StockChart.qml + \skipto Rectangle + \printuntil height + \dots + \skipto Canvas + \printuntil id + \dots 8 + \skipto onPaint + \printuntil /^\}$/ + + To understand the application better, browse through its code using + Qt Creator. \include examples-run.qdocinc |