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// Qt-Security score:significant reason:default
4
7
9
15
16QT_END_NAMESPACE
17
18QT_USE_NAMESPACE
19
20/*!
21 \class QPlaceSearchSuggestionReply
22 \inmodule QtLocation
23 \ingroup QtLocation-places
24 \ingroup QtLocation-places-replies
25 \since 5.6
26
27 \brief The QPlaceSearchSuggestionReply class manages a search suggestion operation started by an
28 instance of QPlaceManager.
29
30 On successful completion of the operation, the reply will contain a list of search term
31 suggestions.
32 See \l {Search Suggestions} for an example on how to use a search suggestion reply.
33
34 \sa QPlaceManager
35*/
36
37/*!
38 Constructs a search suggestion reply with a given \a parent.
39*/
40QPlaceSearchSuggestionReply::QPlaceSearchSuggestionReply(QObject *parent)
41 : QPlaceReply(new QPlaceSearchSuggestionReplyPrivate, parent)
42{
43}
44
45/*!
46 Destroys the reply.
47*/
48QPlaceSearchSuggestionReply::~QPlaceSearchSuggestionReply()
49{
50}
51
52/*!
53 Returns the search term suggestions.
54*/
55QStringList QPlaceSearchSuggestionReply::suggestions() const
56{
57 Q_D(const QPlaceSearchSuggestionReply);
58 return d->suggestions;
59}
60
61/*!
62 Returns type of reply.
63*/
64QPlaceReply::Type QPlaceSearchSuggestionReply::type() const
65{
66 return QPlaceReply::SearchSuggestionReply;
67}
68
69/*!
70 Sets the search term \a suggestions.
71*/
72void QPlaceSearchSuggestionReply::setSuggestions(const QStringList &suggestions)
73{
74 Q_D(QPlaceSearchSuggestionReply);
75 d->suggestions = suggestions;
76}
Combined button and popup list for selecting options.