55 lines
1.1 KiB
C++
55 lines
1.1 KiB
C++
#ifndef STAGESETTINGS_H
|
|
#define STAGESETTINGS_H
|
|
|
|
#include <QWidget>
|
|
|
|
#include "datadragon.h"
|
|
|
|
namespace Ui {
|
|
class StageSettings;
|
|
}
|
|
|
|
class StageSettings : public QWidget {
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(QString name READ getName WRITE setName)
|
|
Q_PROPERTY(bool state READ getState WRITE setState NOTIFY toggled)
|
|
Q_PROPERTY(QString champion READ getChampion WRITE setChampion NOTIFY championChanged)
|
|
|
|
public:
|
|
explicit StageSettings(QWidget *parent = nullptr);
|
|
~StageSettings();
|
|
|
|
QString getName() const;
|
|
void setName(const QString& n);
|
|
|
|
bool getState() const;
|
|
void setState(bool);
|
|
|
|
QString getChampion() const;
|
|
void setChampion(const QString& str);
|
|
|
|
void setDataDragon(DataDragon* dd);
|
|
|
|
void resizeEvent(QResizeEvent *event) override;
|
|
|
|
private slots:
|
|
void championChangedinternal(const QString& str);
|
|
void toggledinternal(int state);
|
|
|
|
signals:
|
|
void toggled(bool);
|
|
void championChanged(const QString&);
|
|
|
|
private:
|
|
void rescaleImage();
|
|
void applyChampion(const DataDragon::ChampData& cd);
|
|
|
|
Ui::StageSettings *ui;
|
|
DataDragon* dd = nullptr;
|
|
int currentdisplayedChampKey = -1;
|
|
cv::Mat img;
|
|
};
|
|
|
|
#endif // STAGESETTINGS_H
|