split the selection panel into one card per kind of selection
This commit is contained in:
32
src/ui/selection/ShipyardContent.h
Normal file
32
src/ui/selection/ShipyardContent.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "BufferedBuildingContent.h"
|
||||
#include "SelectionContentFactory.h"
|
||||
|
||||
class QPushButton;
|
||||
class RecipeSelectionControl;
|
||||
class ShipLayoutPreview;
|
||||
|
||||
// The card for a Shipyard (REQ-UI-SELECTION-CONTENT): the schematic selection, the
|
||||
// module layout preview and its Configure button (REQ-MOD-UI-PREVIEW), plus the buffers
|
||||
// and production progress every buffered building shows.
|
||||
//
|
||||
// It is the one card whose cycle is not a recipe: a shipyard's materials and production
|
||||
// time are its schematic's plus every placed module's (REQ-BLD-SHIPYARD).
|
||||
class ShipyardContent : public BufferedBuildingContent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ShipyardContent(const SelectionContext& context, const SelectionRequest& request,
|
||||
QWidget* parent = nullptr);
|
||||
|
||||
protected:
|
||||
void refreshConfiguration() override;
|
||||
CycleInfo getCycleInfo(const Building& building) const override;
|
||||
|
||||
private:
|
||||
RecipeSelectionControl* m_schematicControl;
|
||||
ShipLayoutPreview* m_layoutPreview;
|
||||
QPushButton* m_configureButton;
|
||||
};
|
||||
Reference in New Issue
Block a user