-
Notifications
You must be signed in to change notification settings - Fork 1
/
locationconditiondialog.h
45 lines (34 loc) · 1.07 KB
/
locationconditiondialog.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
#ifndef LOCATIONCONDITIONDIALOG_H
#define LOCATIONCONDITIONDIALOG_H
#include "basecondition.h"
#include "loottablecondition.h"
#include "gameinfomodel.h"
#include <QDialog>
namespace Ui {
class LocationConditionDialog;
}
class LocationConditionDialog : public QDialog, public BaseCondition
{
Q_OBJECT
friend class LootTableCondition;
public:
explicit LocationConditionDialog(QWidget *parent = nullptr);
~LocationConditionDialog();
QJsonObject toJson() const override;
void fromJson(const QJsonObject &value) override;
protected slots:
void onAddedState();
private:
Ui::LocationConditionDialog *ui;
GameInfoModel m_biomeModel;
GameInfoModel m_dimensionModel;
GameInfoModel m_featureModel;
GameInfoModel m_fluidModel;
bool from_1_17 = false;
void initBlockGroup();
void initFluidGroup();
static void setupStateTableFromJson(QTableWidget *table,
const QJsonObject &json);
static QJsonObject jsonFromStateTable(const QTableWidget *table);
};
#endif /* LOCATIONCONDITIONDIALOG_H */