-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModelSetter.h
More file actions
39 lines (32 loc) · 1.1 KB
/
ModelSetter.h
File metadata and controls
39 lines (32 loc) · 1.1 KB
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
#ifndef MODELSETTER_H
#define MODELSETTER_H
#include "DivinationCardFilter.h"
#include "InvestitionModel.h"
#include "InvestitionModelFactory.h"
#include "ItemDataLoader.h"
#include <QObject>
#include <QQuickView>
class ModelSetter : public QObject
{
Q_OBJECT
ItemDataLoader* cardsLoader;
QVector<ItemDataLoader*> itemsLoaders;
QVector<std::shared_ptr<ItemData>> items;
QQuickView* list;
QVector<DivinationCardFilter*> filters;
QVector<std::shared_ptr<DivinationCard>>* cards;
InvestitionModelFactory modelFactory;
int loadedData = 0;
void setModel();
public:
explicit ModelSetter(QObject *parent = nullptr);
ModelSetter(ItemDataLoader *cardsLoader, const QVector<ItemDataLoader *> &itemsLoaders, QVector<DivinationCardFilter*> filters, QQuickView* list);
~ModelSetter();
void initialize(ItemDataLoader *cardsLoader, const QVector<ItemDataLoader *> &itemsLoaders, QVector<DivinationCardFilter*> filters);
void beginPopulatingModel();
void setEmptyModel(QQuickView *list);
void clearModel();
signals:
void modelIsSet();
};
#endif // MODELSETTER_H