Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qplacesearchsuggestionreply.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 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
6
8
14
15QT_END_NAMESPACE
16
17QT_USE_NAMESPACE
18
19/*!
20 \class QPlaceSearchSuggestionReply
21 \inmodule QtLocation
22 \ingroup QtLocation-places
23 \ingroup QtLocation-places-replies
24 \since 5.6
25
26 \brief The QPlaceSearchSuggestionReply class manages a search suggestion operation started by an
27 instance of QPlaceManager.
28
29 On successful completion of the operation, the reply will contain a list of search term
30 suggestions.
31 See \l {Search Suggestions} for an example on how to use a search suggestion reply.
32
33 \sa QPlaceManager
34*/
35
36/*!
37 Constructs a search suggestion reply with a given \a parent.
38*/
39QPlaceSearchSuggestionReply::QPlaceSearchSuggestionReply(QObject *parent)
40 : QPlaceReply(new QPlaceSearchSuggestionReplyPrivate, parent)
41{
42}
43
44/*!
45 Destroys the reply.
46*/
47QPlaceSearchSuggestionReply::~QPlaceSearchSuggestionReply()
48{
49}
50
51/*!
52 Returns the search term suggestions.
53*/
54QStringList QPlaceSearchSuggestionReply::suggestions() const
55{
56 Q_D(const QPlaceSearchSuggestionReply);
57 return d->suggestions;
58}
59
60/*!
61 Returns type of reply.
62*/
63QPlaceReply::Type QPlaceSearchSuggestionReply::type() const
64{
65 return QPlaceReply::SearchSuggestionReply;
66}
67
68/*!
69 Sets the search term \a suggestions.
70*/
71void QPlaceSearchSuggestionReply::setSuggestions(const QStringList &suggestions)
72{
73 Q_D(QPlaceSearchSuggestionReply);
74 d->suggestions = suggestions;
75}