From 5c1e05d5d1fbd42207128f503805be027036e3ef Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Tue, 20 Aug 2019 11:41:36 +0200 Subject: doc: Improve the IVI Generator Tutorial * Add the missing gifs * Don't create bundles on mac * Signature fix for the dbus chapter * Link to this tutorial instead of the Climate Example in some places Change-Id: I1c1afd3c61a04f3eb040440816afc8c2abedc978 Reviewed-by: Kavindra Palaraja --- .../simulation_server/simulation_server.pro | 1 + .../backend_dbus/instrumentclusterbackend.cpp | 2 +- .../chapter6-own-backend/demo_server/demo_server.pro | 2 ++ .../qtautomotivesuite/src/qtautomotive-examples.qdoc | 2 +- .../doc/images/examples_qface_tutorial_dbus.gif | Bin 0 -> 343966 bytes .../doc/images/examples_qface_tutorial_sync.gif | Bin 0 -> 636529 bytes .../doc/images/examples_qface_tutorial_unsync.gif | Bin 0 -> 625820 bytes src/ivicore/doc/src/examples-qface-tutorial.qdoc | 18 +++++++++--------- src/ivicore/doc/src/ivigenerator/getting-started.qdoc | 5 +++-- 9 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 src/ivicore/doc/images/examples_qface_tutorial_dbus.gif create mode 100644 src/ivicore/doc/images/examples_qface_tutorial_sync.gif create mode 100644 src/ivicore/doc/images/examples_qface_tutorial_unsync.gif diff --git a/examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/simulation_server.pro b/examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/simulation_server.pro index 43536d2..a80c220 100644 --- a/examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/simulation_server.pro +++ b/examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/simulation_server.pro @@ -3,6 +3,7 @@ DESTDIR = .. QT = core ivicore QT -= gui +CONFIG -= app_bundle CONFIG += ivigenerator LIBS += -L$$OUT_PWD/../ -l$$qtLibraryTarget(QtIviInstrumentCluster) diff --git a/examples/ivicore/qface-tutorial/chapter6-own-backend/backend_dbus/instrumentclusterbackend.cpp b/examples/ivicore/qface-tutorial/chapter6-own-backend/backend_dbus/instrumentclusterbackend.cpp index 6bc8335..2580a72 100644 --- a/examples/ivicore/qface-tutorial/chapter6-own-backend/backend_dbus/instrumentclusterbackend.cpp +++ b/examples/ivicore/qface-tutorial/chapter6-own-backend/backend_dbus/instrumentclusterbackend.cpp @@ -144,7 +144,7 @@ void InstrumentClusterBackend::fetchFuel() auto reply = m_client->asyncCall("fuel"); auto watcher = new QDBusPendingCallWatcher(reply, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *watcher) { - QDBusPendingReply reply = *watcher; + QDBusPendingReply reply = *watcher; if (reply.isError()) { qCritical() << reply.error(); } else { diff --git a/examples/ivicore/qface-tutorial/chapter6-own-backend/demo_server/demo_server.pro b/examples/ivicore/qface-tutorial/chapter6-own-backend/demo_server/demo_server.pro index 4e6703a..96643ca 100644 --- a/examples/ivicore/qface-tutorial/chapter6-own-backend/demo_server/demo_server.pro +++ b/examples/ivicore/qface-tutorial/chapter6-own-backend/demo_server/demo_server.pro @@ -1,7 +1,9 @@ TARGET = chapter6-demo-server +DESTDIR = .. QT += ivicore dbus QT -= gui +CONFIG -= app_bundle LIBS += -L$$OUT_PWD/../ -l$$qtLibraryTarget(QtIviInstrumentCluster) INCLUDEPATH += $$OUT_PWD/../frontend diff --git a/src/doc/qtautomotivesuite/src/qtautomotive-examples.qdoc b/src/doc/qtautomotivesuite/src/qtautomotive-examples.qdoc index ca2338a..037bd87 100644 --- a/src/doc/qtautomotivesuite/src/qtautomotive-examples.qdoc +++ b/src/doc/qtautomotivesuite/src/qtautomotive-examples.qdoc @@ -80,7 +80,7 @@ \li \l{Qt IVI} \li Shows how to generate models using the Qt IVI Generator. \row - \li \l{Qt IVI Generator Climate Example} + \li \l{Qt IVI Generator Tutorial} \li \l{Qt IVI} \li Shows to use the Qt IVI Generator. \row diff --git a/src/ivicore/doc/images/examples_qface_tutorial_dbus.gif b/src/ivicore/doc/images/examples_qface_tutorial_dbus.gif new file mode 100644 index 0000000..6b3da50 Binary files /dev/null and b/src/ivicore/doc/images/examples_qface_tutorial_dbus.gif differ diff --git a/src/ivicore/doc/images/examples_qface_tutorial_sync.gif b/src/ivicore/doc/images/examples_qface_tutorial_sync.gif new file mode 100644 index 0000000..b1dece6 Binary files /dev/null and b/src/ivicore/doc/images/examples_qface_tutorial_sync.gif differ diff --git a/src/ivicore/doc/images/examples_qface_tutorial_unsync.gif b/src/ivicore/doc/images/examples_qface_tutorial_unsync.gif new file mode 100644 index 0000000..7157d9e Binary files /dev/null and b/src/ivicore/doc/images/examples_qface_tutorial_unsync.gif differ diff --git a/src/ivicore/doc/src/examples-qface-tutorial.qdoc b/src/ivicore/doc/src/examples-qface-tutorial.qdoc index 214d856..0c790d4 100644 --- a/src/ivicore/doc/src/examples-qface-tutorial.qdoc +++ b/src/ivicore/doc/src/examples-qface-tutorial.qdoc @@ -178,7 +178,7 @@ All we need now is the actual integration of the InstrumentCluster QML element and connecting the \c speed property to the \c leftDial. This is done by instantiating the element first with - the id instrumentCluster. + the \c instrumentCluster ID. \quotefromfile ivicore/qface-tutorial/chapter1-basics/instrument-cluster/Cluster.qml \skipto import @@ -289,7 +289,7 @@ \codeline These enums are part of the module class, which is also exported to QML as - InstrumentClusterModule. To trigger a warning in the \c rightDial Item, we use 3 bindings to + \c InstrumentClusterModule. To trigger a warning in the \c rightDial Item, we use 3 bindings to connect to the 3 member variables in the structure: \printuntil } @@ -446,7 +446,7 @@ We start by defining default values for our properties, using annotations in our QFace file. An annotation is a special kind of comment which adds extra data to an interface, method, property, and so on. For this use case we use the \c config_simulator annotation. For more - information, see \{annotations-yaml}{Annotations}. + information, see \l{annotations-yaml}{Annotations}. Currently, in our Instrument Cluster, the temperatur defaults to 0. Let's change this to a temperature in spring, 15 degrees Celsius, with the following YAML fragment: @@ -515,7 +515,7 @@ Each time a frontend instance connects to a backend, the \c initialize() function is called. The same applies to the QML simulation: as the \c initialize() C++ function forwards this to the QML instance. This also applies to all other functions, like setter and getters, for - properties or methods. For more details, see \l{QIviSimulationEngine. + properties or methods. For more details, see \l{QIviSimulationEngine}. Inside the QML \c initialize() function, we call \c{IviSimulator.initializeDefault()}, to read the default values from the \c simulationData object and initialize all properties. This is @@ -526,12 +526,12 @@ Similarly, a setter function is defined for each property; they use the \c{IviSimulator.checkSettings()} to read specific constraint settings for the property from the \c simulationData and check whether these constraints are valid for the new value. If - these constraints aren't valid, then \{IviSimulator.constraint()} is used to provide a + these constraints aren't valid, then \c{IviSimulator.constraint()} is used to provide a meaningful error message to the user. \section2 Define Our Own QML Simulation - As mentioned above, does the InstrumentClusterBackend Item provide all the properties of our + As mentioned above, the \c InstrumentClusterBackend Item does provide all the properties of our QFace file. This can be used to simulate a behavior by changing the properties to the values we want. The simplest form for this would be value assignment, but this would be rather static not exactly what we'd like to achieve. Instead, we use QML Animation objects to change the @@ -583,7 +583,7 @@ just by starting the Instrument Cluster twice and checking whether the animations are in sync. Currently, they're not. - << gif >> ???? + \image examples_qface_tutorial_unsync.gif \section2 Add a QtRemoteObjects Integration @@ -637,7 +637,7 @@ Let's do the final test: starting two Instrument Cluster instances should now show the animations in sync: - << gif >> ??? + \image examples_qface_tutorial_sync.gif \section1 Chapter 6 @@ -760,6 +760,6 @@ Now, when we start the Instrument Cluster, our backend should connect to our D-Bus server and look like this: -< gif > + \image examples_qface_tutorial_dbus.gif */ diff --git a/src/ivicore/doc/src/ivigenerator/getting-started.qdoc b/src/ivicore/doc/src/ivigenerator/getting-started.qdoc index 091a9e5..6015b34 100644 --- a/src/ivicore/doc/src/ivigenerator/getting-started.qdoc +++ b/src/ivicore/doc/src/ivigenerator/getting-started.qdoc @@ -68,6 +68,7 @@ For more information on how Qt locates and loads its plugins, see \l {How to Cre \section1 In-Depth Walkthrough -For an in-depth walkthrough, see the \l {Qt IVI Generator Climate Example}, which contains step by -step instructions on how to use the Qt IVI module. +For an in-depth walkthrough, see the \l {Qt IVI Generator Tutorial}, which contains step by +step instructions on how to use the Qt IVI module to generate a Middlware API based on a QML +application. */ -- cgit v1.2.1