author | Wes Thierry <wesleyt@symbian.org> |
Fri, 05 Nov 2010 11:32:03 +0000 | |
changeset 8 | a593fb7f78c0 |
parent 6 | 4c7de3e5789a |
permissions | -rw-r--r-- |
0 | 1 |
#ifndef MAINWINDOW_H |
2 |
#define MAINWINDOW_H |
|
3 |
||
4 |
#include <QMainWindow> |
|
5 |
#include <QPushButton> |
|
6 |
#include <QGraphicsEllipseItem> |
|
7 |
#include <QTimer> |
|
8 |
#include <QAccelerometer> |
|
9 |
#include <QLineEdit> |
|
10 |
#include <QGraphicsProxyWidget> |
|
11 |
#include <QMediaPlayer> |
|
12 |
#include <QMediaPlaylist> |
|
13 |
#include <QMediaServiceProvider> |
|
14 |
#include <QAudioOutput> |
|
15 |
#include <QFile> |
|
16 |
QTM_USE_NAMESPACE |
|
17 |
||
18 |
namespace Ui { |
|
19 |
class MainWindow; |
|
20 |
} |
|
21 |
||
22 |
class MainWindow : public QMainWindow |
|
23 |
{ |
|
24 |
Q_OBJECT |
|
25 |
||
26 |
public: |
|
27 |
explicit MainWindow(QWidget *parent = 0); |
|
28 |
~MainWindow(); |
|
29 |
||
30 |
private: |
|
31 |
Ui::MainWindow *ui; |
|
6
4c7de3e5789a
update the code to elimninate the jumping
Wesley Thierry <wesleyt@symbian.org>
parents:
0
diff
changeset
|
32 |
QGraphicsEllipseItem *mPacman, *mPacCollider; |
0 | 33 |
QTimer *mUpdateTimer; |
34 |
int mPacState; |
|
35 |
QAccelerometer *mAccelerometer; |
|
36 |
qreal xAxis, yAxis; |
|
37 |
QPointF mLastPt; |
|
38 |
bool mPause; |
|
39 |
QPushButton *pauseButton; |
|
40 |
QMediaPlayer *mPlayer; |
|
41 |
QMediaPlaylist *mPlayList; |
|
42 |
QGraphicsScene *mScene; |
|
43 |
int mNumHits; |
|
44 |
QAudioOutput* mAudio; |
|
45 |
QFile file; |
|
46 |
||
6
4c7de3e5789a
update the code to elimninate the jumping
Wesley Thierry <wesleyt@symbian.org>
parents:
0
diff
changeset
|
47 |
|
0 | 48 |
private slots: |
49 |
void updateGraphics(); |
|
50 |
void updateReading(); |
|
51 |
void pause(); |
|
52 |
void statusChanged(QMediaPlayer::MediaStatus); |
|
53 |
||
54 |
private: |
|
55 |
void setupBoundries(); |
|
6
4c7de3e5789a
update the code to elimninate the jumping
Wesley Thierry <wesleyt@symbian.org>
parents:
0
diff
changeset
|
56 |
void checkCollisions(); |
0 | 57 |
|
58 |
}; |
|
59 |
||
60 |
#endif // MAINWINDOW_H |