-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscore.cpp
29 lines (25 loc) · 815 Bytes
/
score.cpp
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
/**@file score.cpp
* @brief Contains the implementation for the Score class
*/
#include "score.h"
#include "game.h"
//external global varaible Game* game
extern Game* game;
/**This constructor sets the Pixmap for Score
* @brief Score::Score sets the Pixmap for a Score object.
* @param parent makes QLabel a parent of Score
*/
Score::Score(QLabel *parent) : QLabel(parent)
{
setPixmap(QPixmap(":/new/prefix1/wild_pikachu.png"));
setStyleSheet("QLabel {background-color: rgba(0,0,0,0%)}");
setScaledContents(true);
setMaximumSize(40,40);
setMinimumSize(40,40);
}
/**This function changes the Pixmap of a Score object
* @brief Score::changePixmap() sets a different Pixmap for a Score object .
*/
void Score::changePixmap(){
setPixmap(QPixmap(":/new/prefix1/your_pikachu.png"));
}