1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKSOUNDEFFECT_H
5#define QQUICKSOUNDEFFECT_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 for the convenience
12// of other Qt classes. 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 <QSoundEffect>
19#include <QtQml/qqml.h>
20#include <qtmultimediaquickexports.h>
21#include <qurl.h>
22
23QT_BEGIN_NAMESPACE
24
25class Q_MULTIMEDIAQUICK_EXPORT QQuickSoundEffect : public QSoundEffect
26{
27 Q_OBJECT
28 Q_PROPERTY(QUrl source READ qmlSource WRITE qmlSetSource NOTIFY sourceChanged)
29 QML_NAMED_ELEMENT(SoundEffect)
30
31public:
32 QQuickSoundEffect(QObject *parent = nullptr);
33
34 void qmlSetSource(const QUrl &source);
35
36 QUrl qmlSource() const;
37
38Q_SIGNALS:
39 void sourceChanged(const QUrl &source);
40
41private:
42 QUrl m_source;
43};
44
45QT_END_NAMESPACE
46
47#endif
48

source code of qtmultimedia/src/multimediaquick/qquicksoundeffect_p.h