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 <QWidget>
#include "BuildingId.h"
#include "SelectionContext.h"
// The "Clear stuck items" action of the card's runtime group (REQ-UI-BELT-CLEAR): it
// removes every item from the selected belt, splitter and tunnel tiles, which is how a
// stalled line is resolved.
//
// It acts on the whole selection rather than on one tile, which is why a selection of
// belts and tunnel ends aggregates into a single card instead of a count summary
// (REQ-UI-SELECTION-AGGREGATE), and why the count summary shows the action too when a
// belt is among the selected buildings.
class ClearBeltControl : public QWidget
{
Q_OBJECT
public:
ClearBeltControl(const SelectionContext& context,
const std::vector<BuildingId>& ids, QWidget* parent = nullptr);
private:
void clearSelectedTiles() const;
SelectionContext m_context;
std::vector<BuildingId> m_ids;
};