summaryrefslogtreecommitdiff
path: root/doc/src/cpp-qml.qdoc
blob: 4ee4e65e446772d7ebffada1bf6833f639936079 (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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** 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 Digia.  For licensing terms and
** conditions see http://qt.digia.com/licensing.  For further information
** use the contact form at http://qt.digia.com/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: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
\page location-cpp-qml.html
\title Interfaces between C++ and QML Code

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

\section2 Category - QPlaceCategory
\target category
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 snippets/cpp/cppqml.cpp Category get
The following sets the properties of this object based on a QPlaceCategory object from C++:
\snippet snippets/cpp/cppqml.cpp Category set


\section2 ContactDetail - QDeclarativeContactDetail
\target contact_detail
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 snippets/cpp/cppqml.cpp ContactDetail get
The following sets the properties of this object based on a QPlaceContactDetail object from
C++:
\snippet snippets/cpp/cppqml.cpp ContactDetail set


\section2  Place - QPlace
\target place
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 snippets/cpp/cppqml.cpp Place get
The following sets the properties of this object based on a QPlace object from C++:
\snippet snippets/cpp/cppqml.cpp Place set



\section2  PlaceAttribute - QPlaceAttribute
\target placeattribute
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 snippets/cpp/cppqml.cpp PlaceAttribute get
The following sets the properties of this object based on a QPlaceAttribute object from C++:
\snippet snippets/cpp/cppqml.cpp PlaceAttribute set


\section2 Icon - QPlaceIcon
\target placeicon
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 snippets/cpp/cppqml.cpp Icon get
The following sets the properties of this object based on a QPlaceIcon object from C++:
\snippet snippets/cpp/cppqml.cpp Icon set


\section2 User - QPlaceUser
\target placeuser
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 snippets/cpp/cppqml.cpp User get
The following sets the properties of this object based on a QPlaceUser object from C++:
\snippet snippets/cpp/cppqml.cpp User set


\section2 Ratings - QPlaceRatings
\target placeratings
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 snippets/cpp/cppqml.cpp Ratings get
The following sets the properties of this object based on a QPlaceRatings object from C++:
\snippet snippets/cpp/cppqml.cpp Ratings set


\section2 Supplier - QPlaceSupplier
\target placesupplier
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 snippets/cpp/cppqml.cpp Supplier get
The following sets the properties of this object based on a QPlaceSupplier object from C++:
\snippet snippets/cpp/cppqml.cpp Supplier set


\section2 Address - QGeoAddress
\target geoaddress
The \l {Address::address} {Address.address} property is used to provide an interface between C++ and QML code.  First a pointer to a
Address 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 address property.
The following gets the QGeoAddress representing this object from C++:
\snippet snippets/cpp/cppqml.cpp Address get
The following sets the properties of this object based on a QGeoAddress object from C++:
\snippet snippets/cpp/cppqml.cpp Address set


\section2 Location - QGeoLocation
\target location
The \l {Location::location} {Location.location} property is used to provide an interface between C++ and QML code.  First a pointer to a
Location 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 location property.
The following gets the QGeoLocation representing this object from C++:
\snippet snippets/cpp/cppqml.cpp Location get
The following sets the properties of this object based on a QGeoLocation object from C++:
\snippet snippets/cpp/cppqml.cpp Location set

*/