35 lines
1.1 KiB
C++
35 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "BufferedBuildingContent.h"
|
|
#include "SelectionContentFactory.h"
|
|
|
|
class QPushButton;
|
|
class RecipeSelectionControl;
|
|
class SectionBox;
|
|
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 refreshControls(const BuildingTarget& target) override;
|
|
CycleInfo getCycleInfo(const BuildingTarget& target) const override;
|
|
|
|
private:
|
|
RecipeSelectionControl* m_schematicControl;
|
|
SectionBox* m_layoutSection;
|
|
ShipLayoutPreview* m_layoutPreview;
|
|
QPushButton* m_configureButton;
|
|
};
|