move build system to cmake, add train overlord
This commit is contained in:
43
src/trainControllerUI/ui/itemscrollbox.h
Normal file
43
src/trainControllerUI/ui/itemscrollbox.h
Normal file
@ -0,0 +1,43 @@
|
||||
#ifndef RELAYSCROLLBOX_H
|
||||
#define RELAYSCROLLBOX_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <QScroller>
|
||||
#include "itemwidget.h"
|
||||
#include "../items/item.h"
|
||||
#include "../items/itemstore.h"
|
||||
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class RelayScrollBox;
|
||||
}
|
||||
|
||||
class ItemScrollBox : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
std::vector< ItemWidget* > widgets_;
|
||||
|
||||
signals:
|
||||
void deleteRequest(const ItemData& item);
|
||||
|
||||
public:
|
||||
explicit ItemScrollBox(QWidget *parent = nullptr);
|
||||
~ItemScrollBox();
|
||||
|
||||
public slots:
|
||||
|
||||
void addItem(std::weak_ptr<Item> item);
|
||||
void removeItem(const ItemData& item);
|
||||
void jsReqNewItem();
|
||||
|
||||
private:
|
||||
Ui::RelayScrollBox *ui;
|
||||
};
|
||||
|
||||
#endif // RELAYSCROLLBOX_H
|
||||
|
||||
|
Reference in New Issue
Block a user