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
qquick3dambientsound_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 LGPL-3.0-only OR GPL-3.0-only
3#ifndef QQUICK3DAMBIENTSOUND_H
4#define QQUICK3DAMBIENTSOUND_H
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#include <private/qquick3dnode_p.h>
18#include <QUrl>
19#include <qvector3d.h>
20
22
23class QAmbientSound;
24
26{
32 QML_NAMED_ELEMENT(AmbientSound)
33
34public:
37
38 void setSource(QUrl source);
39 QUrl source() const;
40
41 void setVolume(float volume);
42 float volume() const;
43
44 enum Loops
45 {
47 Once = 1
48 };
50
51 int loops() const;
52 void setLoops(int loops);
53
54 bool autoPlay() const;
55 void setAutoPlay(bool autoPlay);
56
57public Q_SLOTS:
58 void play();
59 void pause();
60 void stop();
61
67
68private:
69 QAmbientSound *m_sound = nullptr;
70};
71
73
74#endif
\inmodule QtSpatialAudio
\inmodule QtCore
Definition qobject.h:103
void setAutoPlay(bool autoPlay)
void play()
\qmlmethod AmbientSound::play()
void pause()
\qmlmethod AmbientSound::pause()
void stop()
\qmlmethod AmbientSound::stop()
void setVolume(float volume)
\qmlproperty float AmbientSound::volume
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
GLsizei GLsizei GLchar * source
#define QML_NAMED_ELEMENT(NAME)
#define Q_ENUM(x)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS