give the selection cards their own parts instead of label blobs
This commit is contained in:
@@ -6,15 +6,16 @@
|
||||
#include "BuildingId.h"
|
||||
#include "SelectionContent.h"
|
||||
|
||||
struct Building;
|
||||
struct BuildingTarget;
|
||||
class BufferSection;
|
||||
class ProductionSection;
|
||||
class RecipeSummaryRow;
|
||||
|
||||
// Shared body of the four cards that show one building with buffers -- the Miner and
|
||||
// Assembler, the Smelter and Reprocessing Plant, the Shipyard, and the Salvage Bay
|
||||
// (REQ-UI-SELECTION-CONTENT). All four show the same header status, buffer contents and
|
||||
// production progress; they differ only in what one production cycle costs and how long
|
||||
// it takes, which is what the subclass supplies.
|
||||
// (REQ-UI-SELECTION-CONTENT). All four show the same header identity and status, recipe
|
||||
// summary, buffer contents and production progress; they differ only in what one
|
||||
// production cycle costs and how long it takes, which is what the subclass supplies.
|
||||
//
|
||||
// This is implementation sharing, not a catalog entry: every concrete subclass is one
|
||||
// row of the content catalog.
|
||||
@@ -40,14 +41,22 @@ protected:
|
||||
BufferedBuildingContent(const SelectionContext& context, BuildingId id,
|
||||
QWidget* parent);
|
||||
|
||||
virtual CycleInfo getCycleInfo(const Building& building) const = 0;
|
||||
// Called with a construction site's stored configuration too, so the summary of what
|
||||
// the building will produce is shown before it is built (REQ-BLD-SITE-CONFIG).
|
||||
virtual CycleInfo getCycleInfo(const BuildingTarget& target) const = 0;
|
||||
|
||||
// The subclass's own configuration controls. The identity, the recipe summary, the
|
||||
// buffers and the production progress are handled here.
|
||||
virtual void refreshControls(const BuildingTarget& /*target*/) {}
|
||||
|
||||
BuildingId getBuildingId() const { return m_id; }
|
||||
|
||||
private:
|
||||
void refreshConfiguration() override;
|
||||
void refreshRuntime() override;
|
||||
|
||||
private:
|
||||
BuildingId m_id;
|
||||
RecipeSummaryRow* m_recipeSummary;
|
||||
BufferSection* m_buffers;
|
||||
ProductionSection* m_production;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user