#pragma once #include #include #include class RuneAspektButton; class RuneAspektButtonGroup : public QObject { Q_OBJECT public: RuneAspektButtonGroup(QObject* parent, uint32_t size); virtual ~RuneAspektButtonGroup(); void addButton(RuneAspektButton* button); void setSelectedRunes(const QVector& newRunes); constexpr const QVector& getSelectedRunes() const { return selectedRune; } constexpr uint32_t getSize() const { return size; } void setSubgroups(const QVector>& newSubgroups); static const int INVALID_ASPEKT_ID; signals: void changed(); // signal that the group was changed -> all buttons should refresh private slots: void buttonPressed(int aspektId); private: // try to fetch a aspektId, that is in selectedRune and in the same subgroup as aspektId // return 0 when no suitable candidate is found int getOtherSubgroupMemeber(int aspketId); QVector selectedRune; QVector> subgroups; // might be empty uint32_t size = 0; };