aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2019-08-20 11:41:36 +0200
committerDominik Holland <dominik.holland@pelagicore.com>2019-08-28 09:49:32 +0200
commit5c1e05d5d1fbd42207128f503805be027036e3ef (patch)
tree073b4ee84eccd5ea628ae6747c8ee83756462ca9
parentfbf59071450f81b7bfd8914cc109ece3c2ba8139 (diff)
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 <kpalaraja@luxoft.com>
-rw-r--r--examples/ivicore/qface-tutorial/chapter5-ipc/simulation_server/simulation_server.pro1
-rw-r--r--examples/ivicore/qface-tutorial/chapter6-own-backend/backend_dbus/instrumentclusterbackend.cpp2
-rw-r--r--examples/ivicore/qface-tutorial/chapter6-own-backend/demo_server/demo_server.pro2
-rw-r--r--src/doc/qtautomotivesuite/src/qtautomotive-examples.qdoc2
-rw-r--r--src/ivicore/doc/images/examples_qface_tutorial_dbus.gifbin0 -> 343966 bytes
-rw-r--r--src/ivicore/doc/images/examples_qface_tutorial_sync.gifbin0 -> 636529 bytes
-rw-r--r--src/ivicore/doc/images/examples_qface_tutorial_unsync.gifbin0 -> 625820 bytes
-rw-r--r--src/ivicore/doc/src/examples-qface-tutorial.qdoc18
-rw-r--r--src/ivicore/doc/src/ivigenerator/getting-started.qdoc5
9 files changed, 17 insertions, 13 deletions
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<int> reply = *watcher;
+ QDBusPendingReply<qreal> 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
--- /dev/null
+++ b/src/ivicore/doc/images/examples_qface_tutorial_dbus.gif
Binary files 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
--- /dev/null
+++ b/src/ivicore/doc/images/examples_qface_tutorial_sync.gif
Binary files 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
--- /dev/null
+++ b/src/ivicore/doc/images/examples_qface_tutorial_unsync.gif
Binary files 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.
*/