diff options
| author | manuel <manuel@mausz.at> | 2011-04-10 20:50:54 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-10 20:50:54 +0200 |
| commit | d0eafb0124a39eeda6c00595a943ce9811d589c4 (patch) | |
| tree | b39bea35df3a719c7707950988d180a1516e677d /pacman-c++/client.cpp | |
| parent | 5f7d86446c8d7c8e03ce02f6188ee8dede4a6975 (diff) | |
| download | foop-d0eafb0124a39eeda6c00595a943ce9811d589c4.tar.gz foop-d0eafb0124a39eeda6c00595a943ce9811d589c4.tar.bz2 foop-d0eafb0124a39eeda6c00595a943ce9811d589c4.zip | |
major audio rewrite
Diffstat (limited to 'pacman-c++/client.cpp')
| -rw-r--r-- | pacman-c++/client.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pacman-c++/client.cpp b/pacman-c++/client.cpp index c35510a..394b446 100644 --- a/pacman-c++/client.cpp +++ b/pacman-c++/client.cpp | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #include "client.h" | 1 | #include "client.h" |
| 2 | #include "clicklabel.h" | 2 | #include "clicklabel.h" |
| 3 | #include "audioplayer.h" | 3 | #include "audio.h" |
| 4 | #include "pacman.pb.h" | 4 | #include "pacman.pb.h" |
| 5 | 5 | ||
| 6 | Client::Client() | 6 | Client::Client() |
| @@ -25,9 +25,9 @@ void Client::createMenu() | |||
| 25 | toggleSound->setFixedHeight(16); | 25 | toggleSound->setFixedHeight(16); |
| 26 | toggleSound->setAlignment(Qt::AlignBottom); | 26 | toggleSound->setAlignment(Qt::AlignBottom); |
| 27 | 27 | ||
| 28 | bool sound = AudioPlayer::self()->isWorking(); | 28 | bool sound = AudioManager::self()->isWorking(); |
| 29 | bool muted = !(sound && m_settings->value("muted", false).toBool()); | 29 | bool muted = !(sound && m_settings->value("muted", false).toBool()); |
| 30 | AudioPlayer::self()->setMuted(muted); | 30 | AudioManager::self()->setMuted(muted); |
| 31 | 31 | ||
| 32 | QImage img(muted ? ":/soundoff" : ":/soundon"); | 32 | QImage img(muted ? ":/soundoff" : ":/soundon"); |
| 33 | img.setColor(1, menuBar()->palette().color( | 33 | img.setColor(1, menuBar()->palette().color( |
| @@ -38,7 +38,7 @@ void Client::createMenu() | |||
| 38 | if (sound) | 38 | if (sound) |
| 39 | { | 39 | { |
| 40 | connect(toggleSound, SIGNAL(clicked()), this, SLOT(toggleSound())); | 40 | connect(toggleSound, SIGNAL(clicked()), this, SLOT(toggleSound())); |
| 41 | connect(AudioPlayer::self(), SIGNAL(mutedChanged(bool)), this, SLOT(mutedChanged(bool))); | 41 | connect(AudioManager::self(), SIGNAL(mutedChanged(bool)), this, SLOT(mutedChanged(bool))); |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | menuBar()->setCornerWidget(toggleSound); | 44 | menuBar()->setCornerWidget(toggleSound); |
| @@ -46,9 +46,9 @@ void Client::createMenu() | |||
| 46 | 46 | ||
| 47 | void Client::toggleSound() const | 47 | void Client::toggleSound() const |
| 48 | { | 48 | { |
| 49 | if (!AudioPlayer::self()->isWorking()) | 49 | if (!AudioManager::self()->isWorking()) |
| 50 | return; | 50 | return; |
| 51 | AudioPlayer::self()->setMuted(!AudioPlayer::self()->isMuted()); | 51 | AudioManager::self()->setMuted(!AudioManager::self()->isMuted()); |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | void Client::mutedChanged(bool muted) const | 54 | void Client::mutedChanged(bool muted) const |
