Logo Search packages:      
Sourcecode: kanagram version File versions  Download package

void Kanagram::play ( const QString &  filename ) [private]

play a sound file

Parameters:
filenamethe filename of the sound file in kanagram/sounds/

Definition at line 907 of file kanagram.cpp.

References m_player.

Referenced by checkWord(), refreshVocabularies(), slotNextAnagram(), slotNextVocabulary(), and slotPrevVocabulary().

{
    if (!filename.isEmpty())
    {
        QString soundFile = KStandardDirs::locate("appdata", "sounds/" + filename);
        if (!soundFile.isEmpty())
        {
            if (!m_player)
            {
                m_player = Phonon::createPlayer(Phonon::GameCategory, soundFile);
            }
            else
            {
                m_player->setCurrentSource(soundFile);
            }
            m_player->play();
        }
    }
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index