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
qquicksoundeffect.cpp
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-2.0-only OR GPL-3.0-only
3
5#include <QtQml/qqmlcontext.h>
6
8
10
12{
13 if (m_source == source)
14 return;
15
16 m_source = source;
17 const QQmlContext *context = qmlContext(this);
18 setSource(context ? context->resolvedUrl(source) : source);
20}
21
23{
24 return m_source;
25}
26
28
29#include "moc_qquicksoundeffect_p.cpp"
\inmodule QtCore
Definition qobject.h:103
The QQmlContext class defines a context within a QML engine.
Definition qqmlcontext.h:25
QQuickSoundEffect(QObject *parent=nullptr)
void qmlSetSource(const QUrl &source)
The QSoundEffect class provides a way to play low latency sound effects.
void sourceChanged()
The sourceChanged signal is emitted when the source has been changed.
void setSource(const QUrl &url)
Set the current URL to play to url.
\inmodule QtCore
Definition qurl.h:94
Combined button and popup list for selecting options.
static void * context
GLsizei GLsizei GLchar * source
QQmlContext * qmlContext(const QObject *obj)
Definition qqml.cpp:75
#define emit