2023-05-01 22:36:11 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class RuneAspektButton;
|
|
|
|
}
|
|
|
|
|
2023-06-13 22:40:55 +02:00
|
|
|
class RuneAspektButtonGroup;
|
2023-05-01 22:36:11 +02:00
|
|
|
class RuneAspektButton : public QPushButton {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit RuneAspektButton(QWidget* parent = nullptr);
|
|
|
|
~RuneAspektButton();
|
|
|
|
|
|
|
|
void setAspektId(uint32_t id);
|
2023-06-13 22:40:55 +02:00
|
|
|
void setButtonGroup(RuneAspektButtonGroup* group);
|
2023-05-01 22:36:11 +02:00
|
|
|
|
|
|
|
bool isSelected() const;
|
|
|
|
|
|
|
|
signals:
|
2023-06-13 22:40:55 +02:00
|
|
|
void aspektToggled(int aspekt);
|
2023-05-01 22:36:11 +02:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void buttonPressed();
|
2023-06-13 22:40:55 +02:00
|
|
|
void dataChanged(); // triggers a refresh
|
2023-06-13 23:02:38 +02:00
|
|
|
void checkSelection(uint32_t aspekt); // only used for rune styles
|
2023-05-01 22:36:11 +02:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void setShowSelection(bool selected); // show/hide the red border
|
|
|
|
|
|
|
|
public:
|
|
|
|
uint32_t aspektId = 0;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::RuneAspektButton* ui;
|
2023-06-13 22:40:55 +02:00
|
|
|
RuneAspektButtonGroup* group = nullptr;
|
2023-05-01 22:36:11 +02:00
|
|
|
};
|
|
|
|
|