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
qopenxritem_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QOPENXRITEM_H
5#define QOPENXRITEM_H
6
7#include <QQuickItem>
8#include <QtQuick3D/private/qquick3dnode_p.h>
9
10#include <QtQuick/private/qquicktranslate_p.h>
11
12//
13// W A R N I N G
14// -------------
15//
16// This file is not part of the Qt API. It exists purely as an
17// implementation detail. This header file may change from version to
18// version without notice, or even be removed.
19//
20// We mean it.
21//
22
24
26class QOpenXRView;
27
29{
31 Q_DECLARE_PRIVATE(QOpenXRItem)
32
39
40 QML_NAMED_ELEMENT(XrItem)
41public:
43 {
44 int pointId = -1;
45 QOpenXRItem *target = nullptr;
46 bool grabbed = false;
47 bool pressed = false;
48 qreal touchDistance = 1e6;
52 };
53
54 explicit QOpenXRItem(QQuick3DNode *parent = nullptr);
55 ~QOpenXRItem() override;
56
57 QQuickItem *contentItem() const;
58 void setContentItem(QQuickItem *newContentItem);
59
60 qreal pixelsPerUnit() const;
61 void setPixelsPerUnit(qreal newPixelsPerUnit);
62
64 void setUiScale(QQuickScale *newUiScale);
65
66 bool manualPixelsPerUnit() const;
67 void setManualPixelsPerUnit(bool newManualPixelsPerUnit);
68
69 qreal width() const;
70 void setWidth(qreal newWidth);
71
72 qreal height() const;
73 void setHeight(qreal newHeight);
74
75 QColor color() const;
76 void setColor(const QColor &newColor);
77
78 void componentComplete() override;
79
81
91};
92
94
95#endif // QOPENXRITEM_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
void manualPixelsPerUnitChanged()
void setContentItem(QQuickItem *newContentItem)
bool manualPixelsPerUnit
qreal pixelsPerUnit
void setWidth(qreal newWidth)
void pixelsPerUnitChanged()
void flagsChanged()
void setManualPixelsPerUnit(bool newManualPixelsPerUnit)
QOpenXRItem(QQuick3DNode *parent=nullptr)
\qmltype XrItem \inqmlmodule QtQuick3D.Xr \inherits Node
void setUiScale(QQuickScale *newUiScale)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void contentItemChanged()
void setColor(const QColor &newColor)
void widthChanged()
~QOpenXRItem() override
QQuickScale * uiScale() const
bool handleVirtualTouch(QOpenXRView *view, const QVector3D &pos, TouchState *touchState, QVector3D *offset)
QQuickItem * contentItem
void uiScaleChanged()
void setHeight(qreal newHeight)
void setPixelsPerUnit(qreal newPixelsPerUnit)
void colorChanged()
void heightChanged()
\inmodule QtCore\reentrant
Definition qpoint.h:217
QQuick3DObject * parent
\qmlproperty Object3D QtQuick3D::Object3D::parent This property holds the parent of the Object3D in a...
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
Combined button and popup list for selecting options.
GLint GLsizei GLsizei height
GLint GLsizei width
GLuint color
[2]
GLenum target
GLenum GLuint GLintptr offset
#define QML_NAMED_ELEMENT(NAME)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define signals
long long qint64
Definition qtypes.h:60
double qreal
Definition qtypes.h:187
QQuickView * view
[0]