replace combined stateUpdated signal with individual events
This commit is contained in:
@@ -8,11 +8,13 @@
|
||||
|
||||
#include "Building.h"
|
||||
#include "BuildingId.h"
|
||||
#include "EventHandler.h"
|
||||
#include "GameConfig.h"
|
||||
#include "RecipesConfig.h"
|
||||
#include "ShipLayout.h"
|
||||
#include "ShipsConfig.h"
|
||||
#include "Tick.h"
|
||||
#include "TickAdvancedEvent.h"
|
||||
|
||||
class Simulation;
|
||||
class ShipLayoutPreview;
|
||||
@@ -22,20 +24,24 @@ class QListWidget;
|
||||
class QPushButton;
|
||||
class QVBoxLayout;
|
||||
|
||||
class SelectedBuildingPanel : public QWidget
|
||||
class SelectedBuildingPanel : public QWidget,
|
||||
public EventHandler<TickAdvancedEvent>
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SelectedBuildingPanel(Simulation* sim, const GameConfig* config,
|
||||
QWidget* parent = nullptr);
|
||||
~SelectedBuildingPanel() override;
|
||||
|
||||
signals:
|
||||
void layoutDialogRequested(BuildingId shipyardId);
|
||||
|
||||
public slots:
|
||||
void onSelectionChanged(const std::vector<BuildingId>& ids);
|
||||
void onStateUpdated(Tick tick, int blocks, double speed);
|
||||
|
||||
private:
|
||||
void handleEvent(std::shared_ptr<const TickAdvancedEvent> event) override;
|
||||
|
||||
private slots:
|
||||
void onRecipeChanged(int comboIndex);
|
||||
|
||||
Reference in New Issue
Block a user