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