Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qopenxrspatialanchormodel_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QOPENXRSPATIALANCHORMODEL_H
5#define QOPENXRSPATIALANCHORMODEL_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 <QAbstractListModel>
19#include <QQmlEngine>
20#include <QUuid>
21
23
26
28{
31 Q_PROPERTY(SemanticLabels labels READ labels WRITE setLabels NOTIFY labelsChanged FINAL)
33 QML_NAMED_ELEMENT(XrSpatialAnchorModel)
34public:
38 UUID
39 };
41
43 Celing = 0x01,
44 DoorFrame = 0x02,
45 Floor = 0x04,
46 WallArt = 0x08,
47 WallFace = 0x10,
49 Couch = 0x40,
50 Table = 0x80,
51 Bed = 0x100,
52 Lamp = 0x200,
53 Plant = 0x400,
54 Screen = 0x800,
55 Storage = 0x1000,
56 Other = 0x2000
57 };
59 Q_DECLARE_FLAGS(SemanticLabels , SemanticLabel)
60 Q_FLAG(SemanticLabels)
61
65
66 explicit QOpenXRSpatialAnchorModel(QObject *parent = nullptr);
67
68 int rowCount(const QModelIndex &parent) const override;
69 QVariant data(const QModelIndex &index, int role) const override;
70 QHash<int, QByteArray> roleNames() const override;
71
74
75 FilterMode filterMode() const;
76 void setFilterMode(FilterMode newFilterMode);
77
78 QList<QUuid> uuids() const;
79 void setUuids(const QList<QUuid> &newUuids);
80
81 SemanticLabels labels() const;
82 void setLabels(const SemanticLabels &newLabels);
83
88
89private Q_SLOTS:
90 void handleAnchorAdded(QOpenXRSpatialAnchor* anchor);
91
92private:
93 QOpenXRSpaceExtension *m_spaceExtension = nullptr;
94 FilterMode m_filterMode = FilterMode::All;
95 QList<QUuid> m_uuids;
96 SemanticLabels m_labels;
97};
98
100
101#endif // QOPENXRSPATIALANCHORMODEL_H
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
Definition qlist.h:75
\inmodule QtCore
\inmodule QtCore
Definition qobject.h:103
void setUuids(const QList< QUuid > &newUuids)
int rowCount(const QModelIndex &parent) const override
Returns the number of rows under the given parent.
QHash< int, QByteArray > roleNames() const override
void setFilterMode(FilterMode newFilterMode)
QOpenXRSpatialAnchorModel(QObject *parent=nullptr)
void setLabels(const SemanticLabels &newLabels)
\inmodule QtCore
Definition quuid.h:31
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
@ UserRole
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
GLuint index
[2]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
#define QML_NAMED_ELEMENT(NAME)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_FLAG(x)
#define Q_INVOKABLE
#define Q_SLOTS
#define signals