equal
deleted
inserted
replaced
6 #include <hwform.h> |
6 #include <hwform.h> |
7 #include <QSettings> |
7 #include <QSettings> |
8 #include <gameuiconfig.h> |
8 #include <gameuiconfig.h> |
9 |
9 |
10 QPushButtonWithSound::QPushButtonWithSound(QWidget *parent) : |
10 QPushButtonWithSound::QPushButtonWithSound(QWidget *parent) : |
11 QPushButton(parent) |
11 QPushButton(parent), |
|
12 isSoundEnabled(true) |
12 { |
13 { |
13 connect(this, SIGNAL(clicked()), this, SLOT(buttonClicked())); |
14 connect(this, SIGNAL(clicked()), this, SLOT(buttonClicked())); |
14 } |
15 } |
15 |
16 |
16 void QPushButtonWithSound::buttonClicked() |
17 void QPushButtonWithSound::buttonClicked() |
17 { |
18 { |
18 if (!HWForm::config->isFrontendSoundEnabled()) |
19 if ( !isSoundEnabled || !HWForm::config->isFrontendSoundEnabled()) |
19 return; |
20 return; |
20 |
21 |
21 HWDataManager & dataMgr = HWDataManager::instance(); |
22 HWDataManager & dataMgr = HWDataManager::instance(); |
22 |
23 |
23 QString soundsDir = QString("Sounds/"); |
24 QString soundsDir = QString("Sounds/"); |