25 lines
517 B
C++
25 lines
517 B
C++
#ifndef ITEMSOURCE_H
|
|
#define ITEMSOURCE_H
|
|
|
|
#include <QObject>
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
#include "item.h"
|
|
|
|
class ItemSource : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ItemSource(QObject *parent = nullptr);
|
|
|
|
public slots:
|
|
virtual void refresh() = 0;
|
|
|
|
signals:
|
|
void gotItems(std::vector<std::shared_ptr<Item>> items, bool inform = true);
|
|
void requestReplaceItems(std::vector<std::shared_ptr<Item>> items);
|
|
void updateItems(std::vector<ItemData> items, bool inform = true);
|
|
};
|
|
|
|
#endif // ITEMSOURCE_H
|