summaryrefslogtreecommitdiff
path: root/src/location/doc/src/cpp-qml.qdoc
blob: b8a49fa5789dd0f8c4da4f8d95e622992687dfa7 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** 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 location-cpp-qml.html
\title Interfaces between C++ and QML Code in Qt Location

\brief Some of the location QML types providing interfaces to access and modify properties in C++.

\section2 Category - QPlaceCategory
The \l {Category::category} {Category.category} property is used to provide an interface between C++ and QML code.  First a pointer to a
Category object must be obtained from C++, then use the \l {QObject::property()}{property()} and
\l {QObject::setProperty()}{setProperty()} functions to get and set the \c category property.
The following gets the QPlaceCategory representing this object from C++:
\snippet cpp/cppqml.cpp Category get
The following sets the properties of this object based on a QPlaceCategory object from C++:
\snippet cpp/cppqml.cpp Category set


\section2 ContactDetail - QDeclarativeContactDetail
The \l {ContactDetail::contactDetail} {ContactDetail.contactDetail} property is used to provide an interface between C++ and QML code.  First a pointer to a ContactDetail object must be obtained from C++, then use the
\l {QObject::property()}{property()} and \l {QObject::setProperty()}{setProperty()} functions
to get and set the \c contactDetail property.
The following gets the QPlaceContactDetail representing this object from C++:
\snippet cpp/cppqml.cpp ContactDetail get
The following sets the properties of this object based on a QPlaceContactDetail object from
C++:
\snippet cpp/cppqml.cpp ContactDetail set


\section2  Place - QPlace
The \l {Place::place} {Place.place} property is used to provide an interface between C++ and QML code.  First a pointer to a Place object must be obtained from C++, then use the
\l {QObject::property()}{property()} and \l {QObject::setProperty()}{setProperty()} functions
to get and set the \c place property.
The following gets the QPlace representing this object from C++:
\snippet cpp/cppqml.cpp Place get
The following sets the properties of this object based on a QPlace object from C++:
\snippet cpp/cppqml.cpp Place set



\section2  PlaceAttribute - QPlaceAttribute
The \l {PlaceAttribute::attribute} {PlaceAttribute.attribute} property is used to provide an interface between C++ and QML code.  First a pointer to a
PlaceAttribute object must be obtained from C++, then use the
\l {QObject::property()}{property()} and \l {QObject::setProperty()}{setProperty()} functions
to get and set the \c attribute property.
The following gets the QPlaceAttribute representing this object from C++:
\snippet cpp/cppqml.cpp PlaceAttribute get
The following sets the properties of this object based on a QPlaceAttribute object from C++:
\snippet cpp/cppqml.cpp PlaceAttribute set


\section2 Icon - QPlaceIcon
The \l {Icon::icon} {Icon.icon} property is used to provide an interface between C++ and QML code.  First a pointer to a Icon object must be obtained from C++, then use the \l {QObject::property()}{property()} and
\l {QObject::setProperty()}{setProperty()} functions to get and set the \c icon property.
The following gets the QPlaceIcon representing this object from C++:
\snippet cpp/cppqml.cpp Icon get
The following sets the properties of this object based on a QPlaceIcon object from C++:
\snippet cpp/cppqml.cpp Icon set


\section2 User - QPlaceUser
The \l {User::user} {User.user} property is used to provide an interface between C++ and QML code.  First a pointer to a
User object must be obtained from C++, then use the \l {QObject::property()}{property()} and
\l {QObject::setProperty()}{setProperty()} functions to get and set the \c user property.
The following gets the QPlaceUser representing this object from C++:
\snippet cpp/cppqml.cpp User get
The following sets the properties of this object based on a QPlaceUser object from C++:
\snippet cpp/cppqml.cpp User set


\section2 Ratings - QPlaceRatings
The \l {Ratings::ratings} {Ratings.ratings} property is used to provide an interface between C++ and QML code.  First a pointer to a
Ratings object must be obtained from C++, then use the \l {QObject::property()}{property()} and
\l {QObject::setProperty()}{setProperty()} functions to get and set the \c ratings property.
The following gets the QPlaceRating representing this object from C++:
\snippet cpp/cppqml.cpp Ratings get
The following sets the properties of this object based on a QPlaceRatings object from C++:
\snippet cpp/cppqml.cpp Ratings set


\section2 Supplier - QPlaceSupplier
The \l {Supplier::supplier} {Supplier.supplier} property is used to provide an interface between C++ and QML code.  First a pointer to a
Supplier object must be obtained from C++, then use the \l {QObject::property()}{property()} and
\l {QObject::setProperty()}{setProperty()} functions to get and set the \c supplier property.
The following gets the QPlaceSupplier representing this object from C++:
\snippet cpp/cppqml.cpp Supplier get
The following sets the properties of this object based on a QPlaceSupplier object from C++:
\snippet cpp/cppqml.cpp Supplier set

*/