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
qgeoshape_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// Qt-Security score:significant reason:default
4
5#ifndef QGEOSHAPE_P_H
6#define QGEOSHAPE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtCore/QSharedData>
20
21#include "qgeorectangle.h"
22#include "private/qglobal_p.h"
23
24QT_BEGIN_NAMESPACE
25
26class QGeoShapePrivate : public QSharedData
27{
28public:
29 explicit QGeoShapePrivate(QGeoShape::ShapeType type);
30 virtual ~QGeoShapePrivate();
31
32 virtual bool isValid() const = 0;
33 virtual bool isEmpty() const = 0;
34 virtual bool contains(const QGeoCoordinate &coordinate) const = 0;
35
36 virtual QGeoCoordinate center() const = 0;
37
38 virtual QGeoRectangle boundingGeoRectangle() const = 0;
39
40 virtual QGeoShapePrivate *clone() const = 0;
41
42 virtual bool operator==(const QGeoShapePrivate &other) const;
43
44 virtual size_t hash(size_t seed) const = 0;
45
46 QGeoShape::ShapeType type;
47};
48
49// don't use the copy constructor when detaching from a QSharedDataPointer, use virtual clone()
50// call instead.
51template <>
52Q_INLINE_TEMPLATE QGeoShapePrivate *QSharedDataPointer<QGeoShapePrivate>::clone()
53{
54 return d->clone();
55}
56
57QT_END_NAMESPACE
58
59#endif
Combined button and popup list for selecting options.