aboutsummaryrefslogtreecommitdiffstats
path: root/src/ivicore/doc/src/ivigenerator/getting-started.qdoc
blob: b714774eb93101f84f0c7352fd61a26725eb6160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2019 Luxoft Sweden AB
** Copyright (C) 2018 Pelagicore AG
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\page get-started-ivigenerator.html
\title Get Started with the Qt IVI Generator

This topic explains how to get started with the Qt IVI Generator. The generator can generate
source code from an Interface Definition Language (IDL) file. The kind of code to generate is
determined by the template that you select.

The Qt IVI Generator is located in the \c bin folder of your Qt installation. If it is not
available, make sure that your configuration meets all of the prerequisites listed in the
qmake configuration summary. For more details on how to configure Qt IVI, see \l {Configuration}.

\section1 Basics

The generator takes an IDL file as input to generate its source code. The code snippet below
shows a minimal IDL file:

\code
module my.idl 1.0

interface MyInterface {
    property int value;
    void increment();
    signal valueIncremented(int newValue);
}
\endcode

The IDL defines a new module or namespace, \c my.idl, in version \c 1.0. Inside, there is an
interface called \c MyInterface, providing a property that stores a value and a function to
increment and notify the user. Refer to the \l {QFace IDL syntax} for complete documentation on
the IDL.

Using the previously defined IDL file, the \l {frontend-template}{frontend} template can generate
a library providing an implementation of \c MyInterface. The generated class uses the
\l {Dynamic Backend System} provided by Qt IVI for an abstraction of \c frontend and \c backend
code.

The implementation for the class behavior is done inside a \c backend plugin. A basic backend
plugin can be generated by using the \l {backend-simulator-template}{backend simulator} template.
For more information on how Qt locates and loads its plugins, see \l {How to Create Qt Plugins}.

\section1 In-Depth Walkthrough

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.
*/