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