forked from MrBesen/lolautoaccept
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
#ifndef SETTINGSTAB_H
|
|
#define SETTINGSTAB_H
|
|
|
|
#include <QWidget>
|
|
|
|
#include "config.h"
|
|
#include "datadragon.h"
|
|
#include "lolautoaccept.h"
|
|
#include "stagesettings.h"
|
|
|
|
namespace Ui {
|
|
class SettingsTab;
|
|
}
|
|
|
|
class SettingsTab : public QWidget {
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(Position position MEMBER position READ getPosition)
|
|
|
|
public:
|
|
explicit SettingsTab(QWidget *parent = nullptr);
|
|
~SettingsTab();
|
|
|
|
void setup(Config::PositionConfig& conf, DataDragon* dd = nullptr);
|
|
|
|
std::vector<StageSettings::SelectedChamp> getChamps(LolAutoAccept::State s) const;
|
|
bool getState(LolAutoAccept::State s) const;
|
|
void setChamps(LolAutoAccept::State s, const std::vector<QString>&);
|
|
void setState(LolAutoAccept::State s, bool b);
|
|
|
|
Position getPosition() const;
|
|
|
|
private slots:
|
|
void banToggled(bool);
|
|
void banChampsChanged();
|
|
void pickToggled(bool);
|
|
void pickChampsChanged();
|
|
|
|
signals:
|
|
void changed(Position p, LolAutoAccept::State s);
|
|
void toggled(Position p, LolAutoAccept::State s, bool newstate);
|
|
|
|
private:
|
|
StageSettings* getStage(LolAutoAccept::State s) const;
|
|
|
|
Ui::SettingsTab *ui;
|
|
|
|
Config::PositionConfig* conf;
|
|
DataDragon* dd = nullptr;
|
|
Position position = Position::INVALID;
|
|
};
|
|
|
|
#endif // SETTINGSTAB_H
|