Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qgeoserviceproviderpluginohosmapkit.cpp
Go to the documentation of this file.
1
// Copyright (C) 2025 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
include
<
qgeocodingmanagerengineohosmapkit
.
h
>
5
#
include
<
qgeoroutingmanagerengineohosmapkit
.
h
>
6
#
include
<
qgeoserviceproviderpluginohosmapkit
.
h
>
7
#
include
<
qgeotiledmappingmanagerengineohosmapkit
.
h
>
8
#
include
<
qohosmapkitcommon
.
h
>
9
#
include
<
qplacemanagerengineohosmapkit
.
h
>
10
11
QT_BEGIN_NAMESPACE
12
13
namespace
{
14
15
bool
isAuthenticationKeySet
(
16
const
QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString)
17
{
18
if
(
OhosMapKit
::
getAuthenticationKeyParameterOrEmpty
(parameters).isEmpty()) {
19
if
(error !=
nullptr
)
20
*error = QGeoServiceProvider::MissingRequiredParameterError;
21
22
if
(errorString !=
nullptr
) {
23
*errorString = QGeoServiceProviderFactoryOhosMapKit::tr(
24
"OHOS Map Kit plugin requires a '%1' parameter. "
25
"Visit Huawei AppGallery Connect service to generate it."
)
26
.arg(OhosMapKit::authenticationKeyParameterName);
27
}
28
return
false
;
29
}
30
return
true
;
31
}
32
33
}
34
35
QGeoCodingManagerEngine *
QGeoServiceProviderFactoryOhosMapKit
::createGeocodingManagerEngine(
36
const
QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString)
const
37
{
38
return
isAuthenticationKeySet(parameters, error, errorString)
39
? makeQGeoCodingManagerEngineOhosMapKit(parameters, error, errorString)
40
:
nullptr
;
41
}
42
43
QGeoMappingManagerEngine
*
QGeoServiceProviderFactoryOhosMapKit
::
createMappingManagerEngine
(
44
const
QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString)
const
45
{
46
return
isAuthenticationKeySet(parameters, error, errorString)
47
? makeQGeoTiledMappingManagerEngineOhosMapKit(parameters, error, errorString)
48
:
nullptr
;
49
}
50
51
QGeoRoutingManagerEngine
*
QGeoServiceProviderFactoryOhosMapKit
::
createRoutingManagerEngine
(
52
const
QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString)
const
53
{
54
return
isAuthenticationKeySet(parameters, error, errorString)
55
? makeQGeoRoutingManagerEngineOhosMapKit(parameters, error, errorString)
56
:
nullptr
;
57
}
58
59
QPlaceManagerEngine
*
QGeoServiceProviderFactoryOhosMapKit
::
createPlaceManagerEngine
(
60
const
QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString)
const
61
{
62
return
isAuthenticationKeySet(parameters, error, errorString)
63
? makeQPlaceManagerEngineOhosMapKit(parameters, error, errorString)
64
:
nullptr
;
65
}
66
67
QT_END_NAMESPACE
QGeoServiceProviderFactoryOhosMapKit
Definition
qgeoserviceproviderpluginohosmapkit.h:14
QGeoServiceProviderFactoryOhosMapKit::createMappingManagerEngine
QGeoMappingManagerEngine * createMappingManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const
Returns a new QGeoMappingManagerEngine instance, initialized with parameters, which implements mappin...
Definition
qgeoserviceproviderpluginohosmapkit.cpp:43
QGeoServiceProviderFactoryOhosMapKit::createRoutingManagerEngine
QGeoRoutingManagerEngine * createRoutingManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const
Returns a new QGeoRoutingManagerEngine instance, initialized with parameters, which implements routin...
Definition
qgeoserviceproviderpluginohosmapkit.cpp:51
QGeoServiceProviderFactoryOhosMapKit::createPlaceManagerEngine
QPlaceManagerEngine * createPlaceManagerEngine(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString) const
Returns a new QPlaceManagerEngine instance, initialized with parameters, which implements the place s...
Definition
qgeoserviceproviderpluginohosmapkit.cpp:59
OhosMapKit
Definition
qohosmapkitcommon.h:19
OhosMapKit::getAuthenticationKeyParameterOrEmpty
QString getAuthenticationKeyParameterOrEmpty(const QVariantMap ¶meters)
Definition
qohosmapkitcommon.cpp:25
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QT_BEGIN_NAMESPACE::isAuthenticationKeySet
bool isAuthenticationKeySet(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString)
Definition
qgeoserviceproviderpluginohosmapkit.cpp:15
qtlocation
src
plugins
geoservices
ohosmapkit
qgeoserviceproviderpluginohosmapkit.cpp
Generated on
for Qt by
1.18.0