From bba0dae4c9ed934d786e7d9f143248e4b4970745 Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Fri, 3 Feb 2017 16:59:36 +0100 Subject: Documentation improvements * Clarified how the QIviProperty signals are relayed for QML * Added documentation for the ivimedia examples * Added an qtivi examples page to show the examples of all sub modules * Added documentation for the geniviextras example Task-number: QTAUTO-188 Change-Id: Ic53742923584c327974cfaf4bf56f0e439381b98 Reviewed-by: Robert Griebl --- examples/geniviextras/qdlt/loggingcategories.cpp | 4 ++++ examples/geniviextras/qdlt/main.cpp | 2 ++ examples/media/tuner/main.qml | 15 +++++++++++++++ examples/vehiclefunctions/climate_qml/main.qml | 16 ++++++++-------- 4 files changed, 29 insertions(+), 8 deletions(-) (limited to 'examples') diff --git a/examples/geniviextras/qdlt/loggingcategories.cpp b/examples/geniviextras/qdlt/loggingcategories.cpp index 7864d35..c800f85 100644 --- a/examples/geniviextras/qdlt/loggingcategories.cpp +++ b/examples/geniviextras/qdlt/loggingcategories.cpp @@ -53,9 +53,13 @@ #include "loggingcategories.h" #include +//![1] QDLT_REGISTER_APPLICATION("APP1", "Description for APP") +//![1] +//![2] QDLT_LOGGING_CATEGORY(FOO, "com.pelagicore.foo", "FOO", "FOO CATEGORY") QDLT_LOGGING_CATEGORY(BAR, "com.pelagicore.bar", "BAR", "BAR CATEGORY") QDLT_FALLBACK_CATEGORY(FOO) +//![2] diff --git a/examples/geniviextras/qdlt/main.cpp b/examples/geniviextras/qdlt/main.cpp index cabdcd4..76f2db3 100644 --- a/examples/geniviextras/qdlt/main.cpp +++ b/examples/geniviextras/qdlt/main.cpp @@ -60,7 +60,9 @@ int main(int argc, char *argv[]) { +//![1] qInstallMessageHandler(QDltRegistration::messageHandler); +//![1] QCoreApplication a(argc, argv); diff --git a/examples/media/tuner/main.qml b/examples/media/tuner/main.qml index 71d1444..d44c77d 100644 --- a/examples/media/tuner/main.qml +++ b/examples/media/tuner/main.qml @@ -62,6 +62,7 @@ ApplicationWindow { height: 500 title: qsTr("Tuner") + //![1] AmFmTuner { id: tuner @@ -75,11 +76,13 @@ ApplicationWindow { console.log("A Station SCAN has been stopped") } } + //![1] SplitView { id: splitView1 anchors.fill: parent + //![2] ColumnLayout { RowLayout { @@ -154,8 +157,11 @@ ApplicationWindow { onClicked: tuner.seekUp() } } + } + //![2] + //![3] ListView { spacing: 8 clip: true @@ -163,22 +169,26 @@ ApplicationWindow { width: 300 Layout.fillHeight: true + //![4] model: SearchAndBrowseModel { serviceObject: tuner.serviceObject contentType: "station" } + //![4] delegate: Rectangle { width: ListView.view.width height: column.height color: "#efefef" + //![5] MouseArea { anchors.fill: parent onClicked: { tuner.tune(model.item) } } + //![5] Row { anchors.fill: parent @@ -190,6 +200,7 @@ ApplicationWindow { Text { text: "Type: " + model.item.frequency } } + //![6] Button { id: addButton text: "+" @@ -215,10 +226,13 @@ ApplicationWindow { onCountChanged: addButton.checkExists() } } + //![6] } } } + //![3] + //![7] ListView { spacing: 8 clip: true @@ -288,5 +302,6 @@ ApplicationWindow { } } } + //![7] } } diff --git a/examples/vehiclefunctions/climate_qml/main.qml b/examples/vehiclefunctions/climate_qml/main.qml index 4c2bf2c..1d84f47 100644 --- a/examples/vehiclefunctions/climate_qml/main.qml +++ b/examples/vehiclefunctions/climate_qml/main.qml @@ -64,18 +64,18 @@ ApplicationWindow { height: 324 visible: true -//![1] + //![1] ClimateControl { id: climateControl discoveryMode: ClimateControl.AutoDiscovery } -//![1] + //![1] ColumnLayout { anchors.fill: parent anchors.margins: 10 -//![2] + //![2] GroupBox { title: "Air Flow Direction" @@ -185,9 +185,9 @@ ApplicationWindow { } } } -//![2] + //![2] Row { -//![3] + //![3] GroupBox { title: "Front Left Zone" @@ -310,9 +310,9 @@ ApplicationWindow { } } } + //![3] } } -//![3] MessageDialog { id: messageDialog @@ -321,10 +321,10 @@ ApplicationWindow { icon: StandardIcon.Critical } -//![4] + //![4] Component.onCompleted: { if (!climateControl.isValid) messageDialog.open() } -//![4] + //![4] } -- cgit v1.2.1