Filer
Public Member Functions | Static Public Member Functions | List of all members
SoundPlayer Class Reference

The SoundPlayer class provides functionality to play sound effects. More...

#include <SoundPlayer.h>

Inheritance diagram for SoundPlayer:
Inheritance graph
[legend]
Collaboration diagram for SoundPlayer:
Collaboration graph
[legend]

Public Member Functions

 SoundPlayer (QObject *parent=nullptr)
 Constructs a SoundPlayer object. More...
 

Static Public Member Functions

static void playSound (const QString &filename)
 Plays a sound effect from the specified file. More...
 

Detailed Description

The SoundPlayer class provides functionality to play sound effects.

Constructor & Destructor Documentation

◆ SoundPlayer()

SoundPlayer::SoundPlayer ( QObject *  parent = nullptr)
explicit

Constructs a SoundPlayer object.

Parameters
parentThe parent QObject (optional).

Member Function Documentation

◆ playSound()

void SoundPlayer::playSound ( const QString &  filename)
static

Plays a sound effect from the specified file.

Parameters
filenameThe path to the sound file to be played.

This static method allows you to play a sound without needing an instance of SoundPlayer.


The documentation for this class was generated from the following files: