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
qplacesearchresult.h
Go to the documentation of this file.
1// Copyright (C) 2015 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
5#ifndef QPLACESEARCHRESULT_H
6#define QPLACESEARCHRESULT_H
7
8#include <QtCore/QSharedDataPointer>
9#include <QtCore/QVariant>
10#include <QtCore/QString>
11#include <QtLocation/qlocationglobal.h>
12
14
15#define Q_DECLARE_SEARCHRESULT_D_FUNC(Class)
16 inline Class##Private *d_func();
17 inline const Class##Private *d_func() const;
18 friend class Class##Private;
19
20#define Q_DECLARE_SEARCHRESULT_COPY_CTOR(Class)
21 Class(const QPlaceSearchResult &other);
22
23class QPlaceSearchRequest;
24class QPlaceSearchResultPrivate;
25class QPlaceIcon;
26
27class Q_LOCATION_EXPORT QPlaceSearchResult
28{
29public:
30 QPlaceSearchResult();
31 QPlaceSearchResult(const QPlaceSearchResult &other);
32
33 virtual ~QPlaceSearchResult();
34
35 QPlaceSearchResult &operator=(const QPlaceSearchResult &other);
36
37 bool operator==(const QPlaceSearchResult &other) const;
38 bool operator!=(const QPlaceSearchResult &other) const {
39 return !(other == *this);
40 }
41
42 enum SearchResultType {
43 UnknownSearchResult = 0,
44 PlaceResult,
45 ProposedSearchResult
46 };
47
48 SearchResultType type() const;
49
50 QString title() const;
51 void setTitle(const QString &title);
52
53 QPlaceIcon icon() const;
54 void setIcon(const QPlaceIcon &icon);
55
56protected:
57 explicit QPlaceSearchResult(QPlaceSearchResultPrivate *d);
58 QSharedDataPointer<QPlaceSearchResultPrivate> d_ptr;
59
60private:
61 inline QPlaceSearchResultPrivate *d_func();
62 inline const QPlaceSearchResultPrivate *d_func() const;
63
64 friend class QPlaceSearchResultPrivate;
65};
66
67Q_DECLARE_TYPEINFO(QPlaceSearchResult, Q_RELOCATABLE_TYPE);
68
69QT_END_NAMESPACE
70
71Q_DECLARE_METATYPE(QPlaceSearchResult)
72Q_DECLARE_METATYPE(QPlaceSearchResult::SearchResultType)
73
74#endif // QPLACESEARCHRESULT_H
bool compare(const QPlaceSearchResultPrivate *other) const override
\inmodule QtLocation
Combined button and popup list for selecting options.
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
#define Q_IMPLEMENT_SEARCHRESULT_D_FUNC(Class)
#define Q_IMPLEMENT_SEARCHRESULT_COPY_CTOR(Class)
#define Q_DEFINE_SEARCHRESULT_PRIVATE_HELPER(Class, ResultType)