-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEntityAttributeWidget.h
More file actions
49 lines (34 loc) · 942 Bytes
/
Copy pathEntityAttributeWidget.h
File metadata and controls
49 lines (34 loc) · 942 Bytes
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
#ifndef ENTITY_ATTRIBUTE_WIDGET_H
#define ENTITY_ATTRIBUTE_WIDGET_H
#include <QWidget>
#include <QLabel>
#include <QString>
#include <QVBoxLayout>
#include "Animal.h"
class EntityAttributeWidget : public QWidget
{
public:
EntityAttributeWidget();
virtual ~EntityAttributeWidget();
void setAnimal(std::weak_ptr<Animal> a);
void update();
protected:
std::weak_ptr<Animal> animal;
QVBoxLayout * layout;
QLabel * defaultLabel;
const QString healthText = "Health: ";
QLabel * healthLabel;
const QString hungerText = "Hunger: ";
QLabel * hungerLabel;
const QString thirstText = "Thirst: ";
QLabel * thirstLabel;
const QString fearText = "Fear: ";
QLabel * fearLabel;
const QString sexText = "Sex: ";
QLabel * sexLabel;
const QString matingText = "Mating: ";
QLabel * matingLabel;
const QString ageText = "Age: ";
QLabel * ageLabel;
};
#endif //ENTITY_ATTRIBUTE_WIDGET_H