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
4#ifndef QGEOSHAPE_P_H
5#define QGEOSHAPE_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 <QtCore/QSharedData>
19
20#include "qgeorectangle.h"
21#include "private/qglobal_p.h"
22
23QT_BEGIN_NAMESPACE
24
25class QGeoShapePrivate : public QSharedData
26{
27public:
28 explicit QGeoShapePrivate(QGeoShape::ShapeType type);
29 virtual ~QGeoShapePrivate();
30
31 virtual bool isValid() const = 0;
32 virtual bool isEmpty() const = 0;
33 virtual bool contains(const QGeoCoordinate &coordinate) const = 0;
34
35 virtual QGeoCoordinate center() const = 0;
36
37 virtual QGeoRectangle boundingGeoRectangle() const = 0;
38
39 virtual QGeoShapePrivate *clone() const = 0;
40
41 virtual bool operator==(const QGeoShapePrivate &other) const;
42
43 virtual size_t hash(size_t seed) const = 0;
44
45 QGeoShape::ShapeType type;
46};
47
48// don't use the copy constructor when detaching from a QSharedDataPointer, use virtual clone()
49// call instead.
50template <>
51Q_INLINE_TEMPLATE QGeoShapePrivate *QSharedDataPointer<QGeoShapePrivate>::clone()
52{
53 return d->clone();
54}
55
56QT_END_NAMESPACE
57
58#endif
Combined button and popup list for selecting options.