Qt
6.x
The Qt SDK
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
4
#include "
qquicksoundeffect_p.h
"
5
#include <QtQml/qqmlcontext.h>
6
7
QT_BEGIN_NAMESPACE
8
9
QQuickSoundEffect::QQuickSoundEffect
(
QObject
*
parent
) :
QSoundEffect
(
parent
) { }
10
11
void
QQuickSoundEffect::qmlSetSource
(
const
QUrl
&
source
)
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
);
19
emit
sourceChanged
(
source
);
20
}
21
22
QUrl
QQuickSoundEffect::qmlSource
()
const
23
{
24
return
m_source;
25
}
26
27
QT_END_NAMESPACE
28
29
#include "moc_qquicksoundeffect_p.cpp"
QObject
\inmodule QtCore
Definition
qobject.h:90
QQmlContext
The QQmlContext class defines a context within a QML engine.
Definition
qqmlcontext.h:25
QQuickSoundEffect::qmlSource
QUrl qmlSource() const
Definition
qquicksoundeffect.cpp:22
QQuickSoundEffect::source
QUrl source
Definition
qquicksoundeffect_p.h:28
QQuickSoundEffect::QQuickSoundEffect
QQuickSoundEffect(QObject *parent=nullptr)
Definition
qquicksoundeffect.cpp:9
QQuickSoundEffect::sourceChanged
void sourceChanged(const QUrl &source)
QQuickSoundEffect::qmlSetSource
void qmlSetSource(const QUrl &source)
Definition
qquicksoundeffect.cpp:11
QSoundEffect
The QSoundEffect class provides a way to play low latency sound effects.
Definition
qsoundeffect.h:21
QSoundEffect::setSource
void setSource(const QUrl &url)
Set the current URL to play to url.
Definition
qsoundeffect.cpp:335
QUrl
\inmodule QtCore
Definition
qurl.h:94
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
context
static void * context
Definition
qandroidaudiosource.cpp:42
source
GLsizei GLsizei GLchar * source
Definition
qopengles2ext.h:952
qmlContext
QQmlContext * qmlContext(const QObject *obj)
Definition
qqml.cpp:71
qquicksoundeffect_p.h
emit
#define emit
Definition
qtmetamacros.h:49
parent
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
Definition
uiaclientinterfaces_p.h:209
qtmultimedia
src
multimediaquick
qquicksoundeffect.cpp
Generated by
1.9.7