API reference - Class QSoundEffect

Notation used in Ruby API documentation

Module: QtMultimedia

Description: Binding of QSoundEffect

Class hierarchy: QSoundEffect » QObject

Sub-classes: Status, QFlags_Status

Public constructors

new QSoundEffectnew(QObject ptr parent = nullptr)Constructor QSoundEffect::QSoundEffect(QObject *parent)

Public methods

void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
[const]stringcategoryMethod QString QSoundEffect::category()
voidcategory=(string category)Method void QSoundEffect::setCategory(const QString &category)
[signal]voidcategoryChangedSignal declaration for QSoundEffect::categoryChanged()
[signal]voiddestroyed(QObject ptr arg1)Signal declaration for QSoundEffect::destroyed(QObject *)
voidemit_categoryChangedEmitter for signal void QSoundEffect::categoryChanged()
voidemit_destroyed(QObject ptr arg1 = nullptr)Emitter for signal void QSoundEffect::destroyed(QObject *)
voidemit_loadedChangedEmitter for signal void QSoundEffect::loadedChanged()
voidemit_loopCountChangedEmitter for signal void QSoundEffect::loopCountChanged()
voidemit_loopsRemainingChangedEmitter for signal void QSoundEffect::loopsRemainingChanged()
voidemit_mutedChangedEmitter for signal void QSoundEffect::mutedChanged()
voidemit_objectNameChanged(string objectName)Emitter for signal void QSoundEffect::objectNameChanged(const QString &objectName)
voidemit_playingChangedEmitter for signal void QSoundEffect::playingChanged()
voidemit_sourceChangedEmitter for signal void QSoundEffect::sourceChanged()
voidemit_statusChangedEmitter for signal void QSoundEffect::statusChanged()
voidemit_volumeChangedEmitter for signal void QSoundEffect::volumeChanged()
boolevent(QEvent ptr event)Virtual method bool QSoundEffect::event(QEvent *event)
booleventFilter(QObject ptr watched,
QEvent ptr event)
Virtual method bool QSoundEffect::eventFilter(QObject *watched, QEvent *event)
[const]boolisLoaded?Method bool QSoundEffect::isLoaded()
[const]boolisMuted?Method bool QSoundEffect::isMuted()
[const]boolisPlaying?Method bool QSoundEffect::isPlaying()
[signal]voidloadedChangedSignal declaration for QSoundEffect::loadedChanged()
[const]intloopCountMethod int QSoundEffect::loopCount()
voidloopCount=(int loopCount)Method void QSoundEffect::setLoopCount(int loopCount)
[signal]voidloopCountChangedSignal declaration for QSoundEffect::loopCountChanged()
[const]intloopsRemainingMethod int QSoundEffect::loopsRemaining()
[signal]voidloopsRemainingChangedSignal declaration for QSoundEffect::loopsRemainingChanged()
[const]boolmutedMethod bool QSoundEffect::isMuted()
voidmuted=(bool muted)Method void QSoundEffect::setMuted(bool muted)
[signal]voidmutedChangedSignal declaration for QSoundEffect::mutedChanged()
[signal]voidobjectNameChanged(string objectName)Signal declaration for QSoundEffect::objectNameChanged(const QString &objectName)
voidplayMethod void QSoundEffect::play()
[const]boolplayingMethod bool QSoundEffect::isPlaying()
[signal]voidplayingChangedSignal declaration for QSoundEffect::playingChanged()
voidsetCategory(string category)Method void QSoundEffect::setCategory(const QString &category)
voidsetLoopCount(int loopCount)Method void QSoundEffect::setLoopCount(int loopCount)
voidsetMuted(bool muted)Method void QSoundEffect::setMuted(bool muted)
voidsetSource(const QUrl url)Method void QSoundEffect::setSource(const QUrl &url)
voidsetVolume(double volume)Method void QSoundEffect::setVolume(double volume)
[const]QUrlsourceMethod QUrl QSoundEffect::source()
voidsource=(const QUrl url)Method void QSoundEffect::setSource(const QUrl &url)
[signal]voidsourceChangedSignal declaration for QSoundEffect::sourceChanged()
[const]QSoundEffect_StatusstatusMethod QSoundEffect::Status QSoundEffect::status()
[signal]voidstatusChangedSignal declaration for QSoundEffect::statusChanged()
voidstopMethod void QSoundEffect::stop()
[const]doublevolumeMethod double QSoundEffect::volume()
voidvolume=(double volume)Method void QSoundEffect::setVolume(double volume)
[signal]voidvolumeChangedSignal declaration for QSoundEffect::volumeChanged()

Public static methods and constants

[static,const]QSoundEffect_StatusErrorEnum constant QSoundEffect::Error
[static,const]QSoundEffect_StatusLoadingEnum constant QSoundEffect::Loading
[static,const]QSoundEffect_StatusNullEnum constant QSoundEffect::Null
[static,const]QSoundEffect_StatusReadyEnum constant QSoundEffect::Ready
QMetaObjectstaticMetaObjectObtains the static MetaObject for this class.
string[]supportedMimeTypesStatic method QStringList QSoundEffect::supportedMimeTypes()
stringtr(string s,
string c = nullptr,
int n = -1)
Static method QString QSoundEffect::tr(const char *s, const char *c, int n)
stringtrUtf8(string s,
string c = nullptr,
int n = -1)
Static method QString QSoundEffect::trUtf8(const char *s, const char *c, int n)

Protected methods (static, non-static and constructors)

voidchildEvent(QChildEvent ptr event)Virtual method void QSoundEffect::childEvent(QChildEvent *event)
voidcustomEvent(QEvent ptr event)Virtual method void QSoundEffect::customEvent(QEvent *event)
voiddisconnectNotify(const QMetaMethod signal)Virtual method void QSoundEffect::disconnectNotify(const QMetaMethod &signal)
[const]boolisSignalConnected(const QMetaMethod signal)Method bool QSoundEffect::isSignalConnected(const QMetaMethod &signal)
[const]intreceivers(string signal)Method int QSoundEffect::receivers(const char *signal)
[const]QObject ptrsenderMethod QObject *QSoundEffect::sender()
[const]intsenderSignalIndexMethod int QSoundEffect::senderSignalIndex()
voidtimerEvent(QTimerEvent ptr event)Virtual method void QSoundEffect::timerEvent(QTimerEvent *event)

Detailed description

Error

Signature: [static,const] QSoundEffect_Status Error

Description: Enum constant QSoundEffect::Error

Python specific notes:
The object exposes a readable attribute 'Error'. This is the getter.

Loading

Signature: [static,const] QSoundEffect_Status Loading

Description: Enum constant QSoundEffect::Loading

Python specific notes:
The object exposes a readable attribute 'Loading'. This is the getter.

Null

Signature: [static,const] QSoundEffect_Status Null

Description: Enum constant QSoundEffect::Null

Python specific notes:
The object exposes a readable attribute 'Null'. This is the getter.

Ready

Signature: [static,const] QSoundEffect_Status Ready

Description: Enum constant QSoundEffect::Ready

Python specific notes:
The object exposes a readable attribute 'Ready'. This is the getter.

_create

Signature: void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

_destroy

Signature: void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

_destroyed?

Signature: [const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

_is_const_object?

Signature: [const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

category

Signature: [const] string category

Description: Method QString QSoundEffect::category()

Python specific notes:
The object exposes a readable attribute 'category'. This is the getter.

category=

Signature: void category= (string category)

Description: Method void QSoundEffect::setCategory(const QString &category)

Python specific notes:
The object exposes a writable attribute 'category'. This is the setter.

categoryChanged

Signature: [signal] void categoryChanged

Description: Signal declaration for QSoundEffect::categoryChanged()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'categoryChanged'. This is the getter.
The object exposes a writable attribute 'categoryChanged'. This is the setter.

childEvent

Signature: void childEvent (QChildEvent ptr event)

Description: Virtual method void QSoundEffect::childEvent(QChildEvent *event)

This method can be reimplemented in a derived class.

customEvent

Signature: void customEvent (QEvent ptr event)

Description: Virtual method void QSoundEffect::customEvent(QEvent *event)

This method can be reimplemented in a derived class.

destroyed

Signature: [signal] void destroyed (QObject ptr arg1)

Description: Signal declaration for QSoundEffect::destroyed(QObject *)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'destroyed'. This is the getter.
The object exposes a writable attribute 'destroyed'. This is the setter.

disconnectNotify

Signature: void disconnectNotify (const QMetaMethod signal)

Description: Virtual method void QSoundEffect::disconnectNotify(const QMetaMethod &signal)

This method can be reimplemented in a derived class.

emit_categoryChanged

Signature: void emit_categoryChanged

Description: Emitter for signal void QSoundEffect::categoryChanged()

Call this method to emit this signal.

emit_destroyed

Signature: void emit_destroyed (QObject ptr arg1 = nullptr)

Description: Emitter for signal void QSoundEffect::destroyed(QObject *)

Call this method to emit this signal.

emit_loadedChanged

Signature: void emit_loadedChanged

Description: Emitter for signal void QSoundEffect::loadedChanged()

Call this method to emit this signal.

emit_loopCountChanged

Signature: void emit_loopCountChanged

Description: Emitter for signal void QSoundEffect::loopCountChanged()

Call this method to emit this signal.

emit_loopsRemainingChanged

Signature: void emit_loopsRemainingChanged

Description: Emitter for signal void QSoundEffect::loopsRemainingChanged()

Call this method to emit this signal.

emit_mutedChanged

Signature: void emit_mutedChanged

Description: Emitter for signal void QSoundEffect::mutedChanged()

Call this method to emit this signal.

emit_objectNameChanged

Signature: void emit_objectNameChanged (string objectName)

Description: Emitter for signal void QSoundEffect::objectNameChanged(const QString &objectName)

Call this method to emit this signal.

emit_playingChanged

Signature: void emit_playingChanged

Description: Emitter for signal void QSoundEffect::playingChanged()

Call this method to emit this signal.

emit_sourceChanged

Signature: void emit_sourceChanged

Description: Emitter for signal void QSoundEffect::sourceChanged()

Call this method to emit this signal.

emit_statusChanged

Signature: void emit_statusChanged

Description: Emitter for signal void QSoundEffect::statusChanged()

Call this method to emit this signal.

emit_volumeChanged

Signature: void emit_volumeChanged

Description: Emitter for signal void QSoundEffect::volumeChanged()

Call this method to emit this signal.

event

Signature: bool event (QEvent ptr event)

Description: Virtual method bool QSoundEffect::event(QEvent *event)

This method can be reimplemented in a derived class.

eventFilter

Signature: bool eventFilter (QObject ptr watched, QEvent ptr event)

Description: Virtual method bool QSoundEffect::eventFilter(QObject *watched, QEvent *event)

This method can be reimplemented in a derived class.

isLoaded?

Signature: [const] bool isLoaded?

Description: Method bool QSoundEffect::isLoaded()

isMuted?

Signature: [const] bool isMuted?

Description: Method bool QSoundEffect::isMuted()

Python specific notes:
The object exposes a readable attribute 'muted'. This is the getter.

isPlaying?

Signature: [const] bool isPlaying?

Description: Method bool QSoundEffect::isPlaying()

Python specific notes:
The object exposes a readable attribute 'playing'. This is the getter.

isSignalConnected

Signature: [const] bool isSignalConnected (const QMetaMethod signal)

Description: Method bool QSoundEffect::isSignalConnected(const QMetaMethod &signal)

This method is protected and can only be called from inside a derived class.

loadedChanged

Signature: [signal] void loadedChanged

Description: Signal declaration for QSoundEffect::loadedChanged()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'loadedChanged'. This is the getter.
The object exposes a writable attribute 'loadedChanged'. This is the setter.

loopCount

Signature: [const] int loopCount

Description: Method int QSoundEffect::loopCount()

Python specific notes:
The object exposes a readable attribute 'loopCount'. This is the getter.

loopCount=

Signature: void loopCount= (int loopCount)

Description: Method void QSoundEffect::setLoopCount(int loopCount)

Python specific notes:
The object exposes a writable attribute 'loopCount'. This is the setter.

loopCountChanged

Signature: [signal] void loopCountChanged

Description: Signal declaration for QSoundEffect::loopCountChanged()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'loopCountChanged'. This is the getter.
The object exposes a writable attribute 'loopCountChanged'. This is the setter.

loopsRemaining

Signature: [const] int loopsRemaining

Description: Method int QSoundEffect::loopsRemaining()

Python specific notes:
The object exposes a readable attribute 'loopsRemaining'. This is the getter.

loopsRemainingChanged

Signature: [signal] void loopsRemainingChanged

Description: Signal declaration for QSoundEffect::loopsRemainingChanged()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'loopsRemainingChanged'. This is the getter.
The object exposes a writable attribute 'loopsRemainingChanged'. This is the setter.

muted

Signature: [const] bool muted

Description: Method bool QSoundEffect::isMuted()

Python specific notes:
The object exposes a readable attribute 'muted'. This is the getter.

muted=

Signature: void muted= (bool muted)

Description: Method void QSoundEffect::setMuted(bool muted)

Python specific notes:
The object exposes a writable attribute 'muted'. This is the setter.

mutedChanged

Signature: [signal] void mutedChanged

Description: Signal declaration for QSoundEffect::mutedChanged()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'mutedChanged'. This is the getter.
The object exposes a writable attribute 'mutedChanged'. This is the setter.

new

Signature: [static] new QSoundEffect new (QObject ptr parent = nullptr)

Description: Constructor QSoundEffect::QSoundEffect(QObject *parent)

This method creates an object of class QSoundEffect.

Python specific notes:
This method is the default initializer of the object.

objectNameChanged

Signature: [signal] void objectNameChanged (string objectName)

Description: Signal declaration for QSoundEffect::objectNameChanged(const QString &objectName)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'objectNameChanged'. This is the getter.
The object exposes a writable attribute 'objectNameChanged'. This is the setter.

play

Signature: void play

Description: Method void QSoundEffect::play()

playing

Signature: [const] bool playing

Description: Method bool QSoundEffect::isPlaying()

Python specific notes:
The object exposes a readable attribute 'playing'. This is the getter.

playingChanged

Signature: [signal] void playingChanged

Description: Signal declaration for QSoundEffect::playingChanged()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'playingChanged'. This is the getter.
The object exposes a writable attribute 'playingChanged'. This is the setter.

receivers

Signature: [const] int receivers (string signal)

Description: Method int QSoundEffect::receivers(const char *signal)

This method is protected and can only be called from inside a derived class.

sender

Signature: [const] QObject ptr sender

Description: Method QObject *QSoundEffect::sender()

This method is protected and can only be called from inside a derived class.

senderSignalIndex

Signature: [const] int senderSignalIndex

Description: Method int QSoundEffect::senderSignalIndex()

This method is protected and can only be called from inside a derived class.

setCategory

Signature: void setCategory (string category)

Description: Method void QSoundEffect::setCategory(const QString &category)

Python specific notes:
The object exposes a writable attribute 'category'. This is the setter.

setLoopCount

Signature: void setLoopCount (int loopCount)

Description: Method void QSoundEffect::setLoopCount(int loopCount)

Python specific notes:
The object exposes a writable attribute 'loopCount'. This is the setter.

setMuted

Signature: void setMuted (bool muted)

Description: Method void QSoundEffect::setMuted(bool muted)

Python specific notes:
The object exposes a writable attribute 'muted'. This is the setter.

setSource

Signature: void setSource (const QUrl url)

Description: Method void QSoundEffect::setSource(const QUrl &url)

Python specific notes:
The object exposes a writable attribute 'source'. This is the setter.

setVolume

Signature: void setVolume (double volume)

Description: Method void QSoundEffect::setVolume(double volume)

Python specific notes:
The object exposes a writable attribute 'volume'. This is the setter.

source

Signature: [const] QUrl source

Description: Method QUrl QSoundEffect::source()

Python specific notes:
The object exposes a readable attribute 'source'. This is the getter.

source=

Signature: void source= (const QUrl url)

Description: Method void QSoundEffect::setSource(const QUrl &url)

Python specific notes:
The object exposes a writable attribute 'source'. This is the setter.

sourceChanged

Signature: [signal] void sourceChanged

Description: Signal declaration for QSoundEffect::sourceChanged()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'sourceChanged'. This is the getter.
The object exposes a writable attribute 'sourceChanged'. This is the setter.

staticMetaObject

Signature: [static] QMetaObject staticMetaObject

Description: Obtains the static MetaObject for this class.

status

Signature: [const] QSoundEffect_Status status

Description: Method QSoundEffect::Status QSoundEffect::status()

Python specific notes:
The object exposes a readable attribute 'status'. This is the getter.

statusChanged

Signature: [signal] void statusChanged

Description: Signal declaration for QSoundEffect::statusChanged()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'statusChanged'. This is the getter.
The object exposes a writable attribute 'statusChanged'. This is the setter.

stop

Signature: void stop

Description: Method void QSoundEffect::stop()

supportedMimeTypes

Signature: [static] string[] supportedMimeTypes

Description: Static method QStringList QSoundEffect::supportedMimeTypes()

This method is static and can be called without an instance.

timerEvent

Signature: void timerEvent (QTimerEvent ptr event)

Description: Virtual method void QSoundEffect::timerEvent(QTimerEvent *event)

This method can be reimplemented in a derived class.

tr

Signature: [static] string tr (string s, string c = nullptr, int n = -1)

Description: Static method QString QSoundEffect::tr(const char *s, const char *c, int n)

This method is static and can be called without an instance.

trUtf8

Signature: [static] string trUtf8 (string s, string c = nullptr, int n = -1)

Description: Static method QString QSoundEffect::trUtf8(const char *s, const char *c, int n)

This method is static and can be called without an instance.

volume

Signature: [const] double volume

Description: Method double QSoundEffect::volume()

Python specific notes:
The object exposes a readable attribute 'volume'. This is the getter.

volume=

Signature: void volume= (double volume)

Description: Method void QSoundEffect::setVolume(double volume)

Python specific notes:
The object exposes a writable attribute 'volume'. This is the setter.

volumeChanged

Signature: [signal] void volumeChanged

Description: Signal declaration for QSoundEffect::volumeChanged()

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'volumeChanged'. This is the getter.
The object exposes a writable attribute 'volumeChanged'. This is the setter.