-
Notifications
You must be signed in to change notification settings - Fork 0
/
attributes.h
55 lines (47 loc) · 1.24 KB
/
attributes.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
#ifndef ATTRIBUTES_H
#define ATTRIBUTES_H
#include <QAbstractButton>
#include <QButtonGroup>
#include <QPainter>
#include <QStyleOption>
#include <QWidget>
#include "indicators.h"
#include <QJsonObject>
namespace Ui {
class Attributes;
}
class Attributes : public QWidget
{
Q_OBJECT
public:
explicit Attributes(QWidget *parent = nullptr, Indicators *anotherWindowPointer = nullptr);
QStringList getAttributesList();
void setIndicatorsPointer(Indicators *ind);
QJsonObject write() const;
void read(const QJsonObject& json);
void clear();
~Attributes();
public slots:
void on_lockButton_toggled(bool checked);
private slots:
void dynamicRemoveDots(QAbstractButton *bt);
void calculateHealth();
void calculateWP();
//void on_lockButton_toggled(bool checked);
void callBoldingFromParent(QAbstractButton *bt, bool state);
private:
int counter = 0;
int hunger = 0;
QRect geometryStack;
Ui::Attributes *ui;
Indicators *indicatorsPointer;
void connectAllButtonGroup();
void paintEvent(QPaintEvent *)
{
QStyleOption opt;
opt.initFrom(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
};
#endif // ATTRIBUTES_H