32 lines
965 B
C++
32 lines
965 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include "BuildingId.h"
|
|
#include "SelectionContent.h"
|
|
#include "SelectionContentFactory.h"
|
|
|
|
|
|
// The count summary for several selected buildings that do not aggregate
|
|
// (REQ-UI-MULTI-SELECTION, REQ-UI-SELECTION-AGGREGATE): how many of each type, and the
|
|
// total building block cost of the selection. No per-building detail is shown.
|
|
class MultiBuildingContent : public SelectionContent
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MultiBuildingContent(const SelectionContext& context,
|
|
const SelectionRequest& request, QWidget* parent = nullptr);
|
|
|
|
protected:
|
|
// The summary is fixed for a given selection -- how many of each type were selected,
|
|
// and what they cost -- so it is built once and has nothing to keep current. A
|
|
// building leaving the selection re-publishes it and rebuilds this card.
|
|
void refreshRuntime() override {}
|
|
|
|
private:
|
|
void buildSummary();
|
|
|
|
std::vector<BuildingId> m_ids;
|
|
};
|