summaryrefslogtreecommitdiffstats
path: root/examples/demos/stocqt/doc
diff options
context:
space:
mode:
authorVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2018-06-26 15:53:07 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2018-07-09 12:43:59 +0000
commit70ce5f4d3ecae010cbaefea741f67b9cc91d0be9 (patch)
tree1d502a8daeb91df02236750e291cf6bbbdb58a93 /examples/demos/stocqt/doc
parent230db034cfee83cdb0fe583d21fe3ad93a4aa11c (diff)
Move demos to qtdoc repository
These demos use several modules and moving them allows to use for example Qt Quick Controls 2 in them. The shared directory should be removed and the examples made self-contained. Change-Id: I5dc667d22388651894d7d145b65752bc5c5cf6cf Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'examples/demos/stocqt/doc')
-rw-r--r--examples/demos/stocqt/doc/images/qtquick-demo-stocqt.pngbin0 -> 27425 bytes
-rw-r--r--examples/demos/stocqt/doc/src/stocqt.qdoc85
2 files changed, 85 insertions, 0 deletions
diff --git a/examples/demos/stocqt/doc/images/qtquick-demo-stocqt.png b/examples/demos/stocqt/doc/images/qtquick-demo-stocqt.png
new file mode 100644
index 000000000..38e279d60
--- /dev/null
+++ b/examples/demos/stocqt/doc/images/qtquick-demo-stocqt.png
Binary files differ
diff --git a/examples/demos/stocqt/doc/src/stocqt.qdoc b/examples/demos/stocqt/doc/src/stocqt.qdoc
new file mode 100644
index 000000000..e324cf63b
--- /dev/null
+++ b/examples/demos/stocqt/doc/src/stocqt.qdoc
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 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$
+**
+****************************************************************************/
+
+/*!
+ \title Qt Quick Demo - StocQt
+ \ingroup qtquickdemos
+ \example demos/stocqt
+ \brief A configurable stock chart for the NASDAQ-100.
+ \borderedimage qtquick-demo-stocqt.png
+
+ The \e{StocQt} application presents a trend chart for the first stock in
+ the list of NASDAQ-100 stocks. It allows the user to choose another stock
+ from the list, and fetches the required data from the offline dataset
+ using \c XMLHttpRequest.
+
+ 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 weekly,
+ monthly, quarterly, or half yearly 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 id
+ \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
+
+ \sa {QML Applications}
+*/