give the selection cards their own parts instead of label blobs

This commit is contained in:
2026-08-07 18:43:23 +02:00
parent 2289277e12
commit 075e44d295
54 changed files with 1505 additions and 533 deletions

View File

@@ -0,0 +1,33 @@
#pragma once
#include <QString>
#include <QWidget>
class QLabel;
// One label/value line: the name on the left, the value hard right
// (REQ-UI-SELECTION-CARD). The panel's plainest part, shared by the ship and station
// stats, the debris scrap, the HQ block stock, and the multi-selection's total cost.
//
// Like the other card parts it knows nothing about the simulation: it is given the two
// strings and lays them out.
class StatRow : public QWidget
{
Q_OBJECT
public:
explicit StatRow(const QString& label, QWidget* parent = nullptr);
void setLabel(const QString& label);
void setValue(const QString& value);
// Draws the value in the palette's highlight color rather than its text color, for
// the one value a card is really about.
void setValueEmphasized(bool emphasized);
// Indents the row, so it reads as belonging to the row above it -- the scrap total
// under a debris count (REQ-UI-FIELD-MULTI-SELECTION).
void setIndented(bool indented);
private:
QLabel* m_labelLabel;
QLabel* m_valueLabel;
};