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
qplacecontent_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 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 QPLACECONTENT_P_H
5#define QPLACECONTENT_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qplacecontent.h"
19#include "qplacesupplier.h"
20#include "qplaceuser.h"
21
22#include <QtCore/QSharedData>
23#include <QtCore/QString>
24#include <QtCore/QVariant>
25
26QT_BEGIN_NAMESPACE
27
28class QPlaceContentPrivate : public QSharedData
29{
30public:
31 QPlaceContentPrivate(QPlaceContent::Type type)
32 : m_type(type)
33 {}
34 bool compare(const QPlaceContentPrivate *other) const;
35 QPlaceContent::Type type() const { return m_type; }
36
37 QMap<QPlaceContent::DataTag, QVariant> data;
38 const QPlaceContent::Type m_type = QPlaceContent::NoType;
39};
40
41#define Q_IMPLEMENT_CONTENT_COPY_CTOR(ContentClass, ContentType) ContentClass
42 ::ContentClass(const QPlaceContent &other)
43 : QPlaceContent(other.type() == ContentType ? other : QPlaceContent(ContentType)) \
44{ \
45}
46
47
49
50#endif
\inmodule QtLocation