QTfrontend/ui/widget/qpushbuttonwithsound.cpp
changeset 6930 d187ea93fc4f
parent 6700 e04da46ee43c
child 7793 3c21da93db9f
equal deleted inserted replaced
6929:c305d31642ac 6930:d187ea93fc4f
     1 #include <QMessageBox>
     1 #include <QMessageBox>
     2 #include <QDir>
     2 #include <QDir>
     3 
     3 
     4 #include "qpushbuttonwithsound.h"
     4 #include "qpushbuttonwithsound.h"
     5 #include "HWDataManager.h"
     5 #include "DataManager.h"
     6 #include "SDLInteraction.h"
     6 #include "SDLInteraction.h"
     7 #include "hwform.h"
     7 #include "hwform.h"
     8 #include "gameuiconfig.h"
     8 #include "gameuiconfig.h"
     9 
     9 
    10 QPushButtonWithSound::QPushButtonWithSound(QWidget *parent) :
    10 QPushButtonWithSound::QPushButtonWithSound(QWidget *parent) :
    17 void QPushButtonWithSound::buttonClicked()
    17 void QPushButtonWithSound::buttonClicked()
    18 {
    18 {
    19     if ( !isSoundEnabled || !HWForm::config->isFrontendSoundEnabled())
    19     if ( !isSoundEnabled || !HWForm::config->isFrontendSoundEnabled())
    20         return;
    20         return;
    21 
    21 
    22     HWDataManager & dataMgr = HWDataManager::instance();
    22     DataManager & dataMgr = DataManager::instance();
    23 
    23 
    24     if (this->isEnabled())
    24     if (this->isEnabled())
    25         SDLInteraction::instance().playSoundFile(dataMgr.findFileForRead("Sounds/roperelease.ogg"));
    25         SDLInteraction::instance().playSoundFile(dataMgr.findFileForRead("Sounds/roperelease.ogg"));
    26 }
    26 }