summaryrefslogtreecommitdiffstats
path: root/pacman-c++/mainwidget.h
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2011-04-14 02:37:31 +0200
committermanuel <manuel@mausz.at>2011-04-14 02:37:31 +0200
commitb18385a95f25e13c767244b494f31bd4fc238143 (patch)
treeaf389057a2d4a03565f70186d7c1d2e49b95828f /pacman-c++/mainwidget.h
parent3d20638fa8e295271ce38953ad1c657d9275bd99 (diff)
downloadfoop-b18385a95f25e13c767244b494f31bd4fc238143.tar.gz
foop-b18385a95f25e13c767244b494f31bd4fc238143.tar.bz2
foop-b18385a95f25e13c767244b494f31bd4fc238143.zip
encapsulate gapless audioplayer commit from yesterday into an own class (gaplessaudioplayer)
added two new menu entrys: toggle sound + toggle ambient sound (2. very useful!)
Diffstat (limited to 'pacman-c++/mainwidget.h')
-rw-r--r--pacman-c++/mainwidget.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/pacman-c++/mainwidget.h b/pacman-c++/mainwidget.h
index a316d9e..6ecd812 100644
--- a/pacman-c++/mainwidget.h
+++ b/pacman-c++/mainwidget.h
@@ -19,19 +19,18 @@ class MainWidget
19public: 19public:
20 MainWidget(QWidget *parent = 0); 20 MainWidget(QWidget *parent = 0);
21 bool connected(); 21 bool connected();
22 void setAmbientMuted(bool muted);
22 23
23protected: 24protected:
24 /* handling of current key */ 25 /* handling of current key */
25 virtual void keyPressEvent(QKeyEvent* ); 26 virtual void keyPressEvent(QKeyEvent *);
26 virtual void keyReleaseEvent(QKeyEvent* ); 27 virtual void keyReleaseEvent(QKeyEvent *);
27 28
28private slots: 29private slots:
29 void startGame(); 30 void startGame();
30 void playerScoreClicked(); 31 void playerScoreClicked();
31 void tick(); 32 void tick();
32 void sendKeyUpdate(); 33 void sendKeyUpdate();
33 void startPlayer1();
34 void startPlayer2();
35 34
36private: 35private:
37 void createGui(); 36 void createGui();
@@ -51,8 +50,7 @@ private:
51 50
52 /* game running */ 51 /* game running */
53 bool m_running; 52 bool m_running;
54 AudioPlayer *m_sirenPlayer1; 53 GaplessAudioPlayer *m_ambientPlayer;
55 AudioPlayer *m_sirenPlayer2;
56 54
57 QTcpSocket *m_socket; 55 QTcpSocket *m_socket;
58 SceneHolder *m_scene; 56 SceneHolder *m_scene;