diff options
author | Marko Kangas <marko.kangas@theqtcompany.com> | 2015-11-27 14:57:46 +0200 |
---|---|---|
committer | Marko Kangas <marko.kangas@theqtcompany.com> | 2015-12-02 15:01:00 +0000 |
commit | cc03ae370b84ecf3709ff5d699a1af6e90a217db (patch) | |
tree | a5c45d385d54dd2b7364397119439e65802e5033 /examples | |
parent | d79e89ddeb1a4e29619c5cb607e6a408771c77ba (diff) | |
download | qtivi-cc03ae370b84ecf3709ff5d699a1af6e90a217db.tar.gz |
Add documentation for QtIVI
Updated and added documentation files to contain module all Qt
classes, QML types and examples documentation.
Change-Id: Ic86b6b130f15b9040aa5c4663b93e98572874db6
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/vehiclefunctions/climate_qml/main.qml | 19 | ||||
-rw-r--r-- | examples/vehiclefunctions/climate_widget/mainwindow.cpp | 6 |
2 files changed, 19 insertions, 6 deletions
diff --git a/examples/vehiclefunctions/climate_qml/main.qml b/examples/vehiclefunctions/climate_qml/main.qml index bd27a53..ad6c0aa 100644 --- a/examples/vehiclefunctions/climate_qml/main.qml +++ b/examples/vehiclefunctions/climate_qml/main.qml @@ -33,7 +33,6 @@ import QtQuick.Window 2.2 import QtQuick.Layouts 1.1 import QtQuick.Dialogs 1.2 -import QtIVICore 1.0 import QtIVIVehicleFunctions 1.0 ApplicationWindow { @@ -42,10 +41,18 @@ ApplicationWindow { height: 324 visible: true +//![1] + ClimateControl { + id: climateControl + autoDiscovery: true + } +//![1] + ColumnLayout { anchors.fill: parent anchors.margins: 10 +//![2] GroupBox { title: "Air Flow Direction" @@ -117,7 +124,9 @@ ApplicationWindow { climateControl.airRecirculation = checked } } +//![2] +//![3] GroupBox { title: "Front Left Zone" @@ -153,11 +162,7 @@ ApplicationWindow { } } } - - ClimateControl { - id: climateControl - autoDiscovery: true - } +//![3] MessageDialog { id: messageDialog @@ -166,8 +171,10 @@ ApplicationWindow { icon: StandardIcon.Critical } +//![4] Component.onCompleted: { if (!climateControl.isValid) messageDialog.open() } +//![4] } diff --git a/examples/vehiclefunctions/climate_widget/mainwindow.cpp b/examples/vehiclefunctions/climate_widget/mainwindow.cpp index 8075e0a..92d0b76 100644 --- a/examples/vehiclefunctions/climate_widget/mainwindow.cpp +++ b/examples/vehiclefunctions/climate_widget/mainwindow.cpp @@ -47,6 +47,7 @@ MainWindow::MainWindow(QWidget *parent) : m_radioButtonGroup->addButton(ui->rb_FloorDuct); m_radioButtonGroup->addButton(ui->rb_FloorPanel); +//![1] m_climateControl = new QtIVIClimateControl(this); m_climateControl->startAutoDiscovery(); @@ -54,6 +55,7 @@ MainWindow::MainWindow(QWidget *parent) : QMessageBox::critical(this, "Auto Discovery Failed !", "No Climate Backend available"); setupUI(); +//![1] } MainWindow::~MainWindow() @@ -61,6 +63,7 @@ MainWindow::~MainWindow() delete ui; } +//![2] void MainWindow::setupUI() { //Air Flow Direction @@ -83,7 +86,9 @@ void MainWindow::setupUI() connect(m_climateControl, &QtIVIClimateControl::heaterEnabledChanged, ui->cb_heater, &QCheckBox::setChecked); connect(ui->cb_heater, &QCheckBox::clicked, m_climateControl, &QtIVIClimateControl::setHeaterEnabled); } +//![2] +//![3] void MainWindow::setupFlowDirectionRadioButtons(QtIVIClimateControl::AirflowDirection direction) { QAbstractButton* button = ui->rb_BiLevel; @@ -118,3 +123,4 @@ void MainWindow::onFlowDirectionButtonToggled(QAbstractButton *button, bool chec m_climateControl->setAirflowDirection(direction); } +//![3] |