switch to using own event system
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "EventHandler.h"
|
||||
#include "GameConfig.h"
|
||||
#include "RecipesConfig.h"
|
||||
#include "SelectionChangedEvent.h"
|
||||
#include "ShipLayout.h"
|
||||
#include "ShipsConfig.h"
|
||||
#include "Tick.h"
|
||||
@@ -30,7 +31,9 @@ class QPushButton;
|
||||
class QVBoxLayout;
|
||||
|
||||
class SelectedBuildingPanel : public QWidget,
|
||||
public CombinedEventHandler<TickAdvancedEvent, EntitySelectedEvent>
|
||||
public CombinedEventHandler<TickAdvancedEvent,
|
||||
EntitySelectedEvent,
|
||||
SelectionChangedEvent>
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -39,15 +42,10 @@ public:
|
||||
QWidget* parent = nullptr);
|
||||
~SelectedBuildingPanel() override;
|
||||
|
||||
signals:
|
||||
void layoutDialogRequested(BuildingId shipyardId);
|
||||
|
||||
public slots:
|
||||
void onSelectionChanged(const std::vector<BuildingId>& ids);
|
||||
|
||||
private:
|
||||
void handleEvent(std::shared_ptr<const TickAdvancedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const EntitySelectedEvent> event) override;
|
||||
void handleEvent(std::shared_ptr<const SelectionChangedEvent> event) override;
|
||||
|
||||
private slots:
|
||||
void onRecipeChanged(int comboIndex);
|
||||
@@ -55,6 +53,7 @@ private slots:
|
||||
void onSplitterFilterChanged();
|
||||
|
||||
private:
|
||||
void onSelectionChanged(const std::vector<BuildingId>& ids);
|
||||
void rebuild();
|
||||
void clearContent();
|
||||
void buildEmpty();
|
||||
|
||||
Reference in New Issue
Block a user