aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc')
-rw-r--r--examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc71
1 files changed, 44 insertions, 27 deletions
diff --git a/examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc b/examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc
index b56b4c1d..124984c1 100644
--- a/examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc
+++ b/examples/quickcontrols2/wearable/doc/src/qtquickcontrols2-wearable.qdoc
@@ -38,7 +38,7 @@
\section1 Structure
- The main .qml file \c wearable.qml consists of an ApplicationWindow, a StackView
+ The main .qml file, \c wearable.qml, consists of an ApplicationWindow, a StackView
for a stack-based navigation model, and buttons for interactive navigation.
\quotefromfile wearable/wearable.qml
@@ -61,9 +61,9 @@
\section1 Styling
The demo uses a custom \l {Styling Qt Quick Controls 2}{Qt Quick Controls 2 style}
- embedded into the demo's resources. Since the style is specific to this particular
- demo, it only needs to implement a few controls. The style also provides a singleton
- type that contains various styling attributes, such as fonts and colors.
+ embedded into the demo's resources. The custom style is implemented for a
+ few controls only, as it is specific to this particular demo. It uses a
+ singleton type for various styling attributes, such as fonts and colors.
\list
\li \c qml/Style/PageIndicator.qml
@@ -83,10 +83,11 @@
\section1 Custom Type
- The demo application contains a custom button type implemented in \c qml/NaviButton.qml.
- The navigation button is used as a home and back button in \c wearable.qml. \c NaviButton
- extends the standard AbstractButton API with properties that control the slide in and slide
- out transitions and the button image.
+ The demo application contains a custom button type implemented in
+ \c qml/NaviButton.qml. The navigation button is used as a home and back
+ button in \c wearable.qml. \c NaviButton extends the AbstractButton type
+ with properties that control the slide in and slide out transitions and
+ the button image.
\quotefromfile wearable/qml/NaviButton.qml
\skipuntil import "Style"
@@ -98,12 +99,26 @@
\skipto }
\printuntil /^\}/
+ \section1 Icons
+
+ The demo ships a custom icon theme. The icons are bundled into the \c :/icons
+ folder in the application's resources. The \c index.theme file lists the contents
+ of the icon theme:
+
+ \quotefile wearable/icons/wearable/index.theme
+
+ Finally, the icon theme is selected in \c main():
+
+ \snippet wearable/wearable.cpp icons
+
+ The icons are used on the Launcher Page, which is presented below. See
+ \l {Icons in Qt Quick Controls 2} for more details about icons and themes.
+
\section1 Launcher Page
- The application launcher, which is specified as the initial content above, is
- implemented using a circular PathView in \c LauncherPage.qml. Each application is
- contained within its own .qml file, which is listed in a ListModel on the launcher
- page.
+ The application launcher is implemented using a circular PathView in
+ \c LauncherPage.qml. Each application is in a separate .qml file,
+ which is added to the ListModel on the launcher page.
\quotefromfile wearable/qml/LauncherPage.qml
\skipto PathView
@@ -116,6 +131,9 @@
\skipto "Settings"
\printuntil delegate:
\dots 8
+ \skipto icon.width
+ \printuntil icon.name
+ \dots 8
\skipto onClicked:
\printto path:
\dots
@@ -133,29 +151,28 @@
applications, data acquisition is implemented using \l XMLHttpRequest to
read from local files. These files were generated by storing responses from
remote servers in JSON format. This code can be easily modified to acquire
- data from real remote servers.
+ data from remote servers.
\section2 Navigation
This application displays a walking route from source to destination. This
- route is obtained as a response by invoking an API provided by
- \l {https://www.openstreetmap.org/}. The response is in JSON format and the
- corresponding JavaScript file associated with the application helps interpret
- the response. Currently, it is not possible to specify the source and destination
- from within the application, but it can be easily added based on the device's
- capabilities. For example, user input could be implemented as screens with
- input fields, or can be communicated over Bluetooth/Wifi from a paired app
- running on another device such as a smart phone or PC.
+ route information is obtained using the REST API provided by
+ \l {https://www.openstreetmap.org/}. The API response is in JSON format, which
+ is parsed using JavaScript by the application. Currently, it is not possible
+ to specify the source and destination from within the application, but it can
+ be added based on the device's capabilities. For example, user input
+ could be implemented as screens with input fields, or can be communicated
+ over Bluetooth/Wifi from a paired application running on another device
+ such as a smart phone or PC.
\section2 Weather
This application displays weather information such as temperature, sunrise
and sunset times, air pressure, and so on. This information is obtained
- as a response to invoking \l {https://openweathermap.org/}. The response is
- in JSON format and the corresponding JavaScript file associated with the
- application helps interpret the response. As with the Navigation application,
- this application can be modified by adding screens to accept location information
- to obtain weather data for a given location.
+ from \l {https://openweathermap.org/} using its REST API. The API response is
+ in JSON format, which is parsed using JavaScript by the application. This
+ application can also be modified by adding screens to obtain weather data for
+ a given location.
\section2 World Clock
@@ -165,7 +182,7 @@
\section2 Others
- The remaining applications return static data for now, but they can easily be
+ The remaining applications return static data for now, but they can be
modified to process response data obtained from respective services.
\include examples-run.qdocinc