split the selection panel into one card per kind of selection

This commit is contained in:
2026-08-07 18:38:55 +02:00
parent cc0ef856e3
commit 2289277e12
60 changed files with 3014 additions and 1559 deletions

View File

@@ -0,0 +1,31 @@
#pragma once
#include <vector>
#include "entt/entity/entity.hpp"
#include "SelectionContent.h"
#include "SelectionContentFactory.h"
class QLabel;
// The card for selected debris (REQ-UI-DEBRIS-PANEL): the scrap still left in it.
//
// It is the field category's aggregating content (REQ-UI-SELECTION-AGGREGATE): several
// pieces of debris show this same card with the count in the header and their scrap
// summed, because that is the one value the card holds and it adds up.
class DebrisContent : public SelectionContent
{
Q_OBJECT
public:
DebrisContent(const SelectionContext& context, const SelectionRequest& request,
QWidget* parent = nullptr);
protected:
void refreshRuntime() override;
private:
std::vector<entt::entity> m_debris;
QLabel* m_scrapLabel;
};