move build system to cmake, add train overlord
This commit is contained in:
parent
ddd0b3a732
commit
a1f9fa172b
60 changed files with 338 additions and 997 deletions
36
src/common/items/itemstore.h
Normal file
36
src/common/items/itemstore.h
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include "item.h"
|
||||
#include "../nfcuid.h"
|
||||
|
||||
class ItemStore: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
protected:
|
||||
std::vector< std::shared_ptr<Item> > items_;
|
||||
|
||||
public:
|
||||
|
||||
ItemStore(QObject *parent = nullptr);
|
||||
virtual ~ItemStore() {}
|
||||
|
||||
inline std::vector< std::shared_ptr<Item> >* getItems()
|
||||
{
|
||||
return &items_;
|
||||
}
|
||||
|
||||
void clear();
|
||||
|
||||
signals:
|
||||
|
||||
void itemDeleted(ItemData item);
|
||||
void itemAdded(std::weak_ptr<Item> Item);
|
||||
|
||||
public slots:
|
||||
|
||||
void removeItem(const ItemData& item);
|
||||
void addItem(std::shared_ptr<Item> item);
|
||||
void addItems(const std::vector<std::shared_ptr<Item>>& itemsIn);
|
||||
void itemStateChanged(const ItemData& item);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue