Changed the section to user/hidden as required for Nokia Store
[ghostsoverboard] / ship.h
1 /**************************************************************************
2         Ghosts Overboard - a game for 'Meego 1.2 Harmattan'
3
4         Copyright (C) 2011  Heli Hyvättinen
5
6         This file is part of Ghosts Overboard
7
8         Ghosts Overboard is free software: you can redistribute it and/or modify
9         it under the terms of the GNU General Public License as published by
10         the Free Software Foundation, either version 2 of the License, or
11         (at your option) any later version.
12
13         This program is distributed in the hope that it will be useful,
14         but WITHOUT ANY WARRANTY; without even the implied warranty of
15         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16         GNU General Public License for more details.
17
18         You should have received a copy of the GNU General Public License
19         along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
21 **************************************************************************/
22
23 #ifndef SHIP_H
24 #define SHIP_H
25
26 #include "orientationcontrolledgraphicspixmapobject.h"
27 #include <QFeedbackHapticsEffect>
28
29 class Ship : public OrientationControlledGraphicsPixmapObject
30 {
31
32        Q_OBJECT
33 public:
34     explicit Ship(QList<QPixmap> pixmapList, QGraphicsItem *parent = 0);
35
36     virtual ~Ship();
37
38 signals:
39
40     /*! Emitted when a ghost is hit */
41     void  pickingGhost(QGraphicsItem* pGhost);
42
43
44
45     /*! Emitted when ghosts fall over board */
46     void droppingGhosts (int ghosts);
47
48 public slots:
49
50     void dropAllGhosts();
51
52     void setVibrationActivate(bool on);
53
54     void allowVibration();
55
56     void disallowVibration();
57
58 protected:
59     bool handleCollisions();
60
61     void updateShipImage();
62
63     int ghostsAboard_;
64
65     QList<QPixmap> shipImages_;
66
67     bool vibrationActive_;
68
69     bool vibrationAllowed_;
70
71     QFeedbackHapticsEffect * pVibrationEffect_;
72
73
74 };
75
76 #endif // SHIP_H