/**************************************************************************** ** ** Copyright (C) 2015 The Qt Company Ltd. ** Contact: http://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 http://www.qt.io/terms-conditions. For further ** information use the contact form at http://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: http://www.gnu.org/copyleft/fdl.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 */