#pragma once #include #include #include class QLabel; // One buffered item: its icon, its count in a larger type, and a sub-line beneath the // count (REQ-UI-SINGLE-SELECTION). Boxed so a row of them reads as separate quantities // rather than as a run of text. class ItemChip : public QWidget { Q_OBJECT public: // An empty icon leaves the icon off and the chip laid out around the text alone. ItemChip(const QPixmap& icon, QWidget* parent = nullptr); void setCount(const QString& count); // Left empty for an item with nothing to say beneath its count. void setSubLine(const QString& subLine); private: QLabel* m_iconLabel; QLabel* m_countLabel; QLabel* m_subLineLabel; };