#pragma once #include #include 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; };