-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiphone.h
58 lines (45 loc) · 1.39 KB
/
iphone.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef IPHONE_H
#define IPHONE_H
/*!\file iphone.h
*
* \brief Contains Iphone image and location.
*
* \author Chad Martin
*
* A Iphone image and location of where to paint.
*/
#include <QImage>
#include <QRect>
/*! \brief A Iphone image and location of where to paint.*/
class Iphone
{
// Defining Public Functions (Methods)
public:
/*! \brief Class Constructor - loads image, moves to specified location.
* Precondition: A new instance of game was created.
* Postcondition: A new Iphone image is loaded and ready to be painted.*/
Iphone();
/*! \brief Class Destructor - Does Nothing*/
~Iphone();
/*! \brief Sets the location of the Iphone.
* Precondition: A Iphone object was created.
* Postcondition: Location is set for the Iphone.*/
void setPosition();
/*! \brief Returns rect of Iphone.
* Precondition: Instance of Game called a paint event.
* Postcondition: The Qrect of the Iphone is returned.
* \return The rect of Iphone.*/
QRect getRect();
/*! \brief Returns image of Iphone.
* Precondition: Instance of Game called a paint event.
* Postcondition: The image of the Iphone will be painted on the screen.
* \return Image of Iphone.*/
QImage & getImage();
// Defining Protected Variables
protected:
/*! \brief The QImage of Iphone.*/
QImage image;
/*! \brief The QRect of Iphone.*/
QRect rect;
};
#endif