-
Notifications
You must be signed in to change notification settings - Fork 0
/
playerbarwidget.h
48 lines (41 loc) · 1.14 KB
/
playerbarwidget.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
#ifndef PLAYERBARWIDGET_H
#define PLAYERBARWIDGET_H
#include <QWidget>
#include <QGridLayout>
#include <QLCDNumber>
#include <QProgressBar>
#include <QPropertyAnimation>
#include <QTimer>
#include <QLabel>
class PlayerBarWidget : public QWidget
{
Q_OBJECT
public:
explicit PlayerBarWidget(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~PlayerBarWidget();
public slots:
void updateCurrentGun(int gun);
void updatePlayerHP(int hp);
void updateGrenades(int grenades);
void updateArmor(int armor);
void updateAmmoNoReloading(int ammoLoaded, int ammoOwned);
void updateAmmoReloading(int ammoLoaded, int ammoOwned);
private:
QProgressBar * reloadingBar = new QProgressBar();
QGridLayout gridLayout;
QLCDNumber qlcdLoadedAmmo;
QLCDNumber qlcdOwnedAmmo;
QLCDNumber qlcdPlayerHP;
QLCDNumber qlcdGrenades;
QLCDNumber qlcdArmor;
QLabel textCurrentGun;
QLabel currentGun;
QLabel textReloardingBar;
QLabel textLoadedAmmo;
QLabel textOwnedAmmo;
QLabel textHP;
QLabel textGrenades;
QLabel textArmor;
void reloadingAnimation();
};
#endif // PLAYERBARWIDGET_H