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
lookatnode_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#ifndef LOOKATNODE_H
18#define LOOKATNODE_H
19
20#include <QtQuick3D/private/qquick3dnode_p.h>
21#include <QtQuick3DHelpers/qtquick3dhelpersexports.h>
22
24
25class Q_QUICK3DHELPERS_EXPORT LookAtNode : public QQuick3DNode
26{
27 Q_OBJECT
28 Q_PROPERTY(QQuick3DNode *target READ target WRITE setTarget NOTIFY targetChanged)
29 QML_NAMED_ELEMENT(LookAtNode)
30 QML_ADDED_IN_VERSION(6, 4)
31
32public:
33 LookAtNode();
34 ~LookAtNode() override;
35
36 QQuick3DNode *target() const;
37
38public Q_SLOTS:
39 void setTarget(QQuick3DNode *node);
40
41Q_SIGNALS:
42 void targetChanged();
43
44private Q_SLOTS:
45 void updateLookAt();
46
47private:
48 QQuick3DNode *m_target = nullptr;
49};
50
51QT_END_NAMESPACE
52
53#endif