forked from MrBesen/lolautoaccept
rune manager preperations
This commit is contained in:
parent
6ffdf23085
commit
ef36280894
|
@ -4,6 +4,7 @@
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
|
|
||||||
#include "position.h"
|
#include "position.h"
|
||||||
|
#include "runepage.h"
|
||||||
|
|
||||||
class Config {
|
class Config {
|
||||||
public:
|
public:
|
||||||
|
@ -27,6 +28,15 @@ public:
|
||||||
StageConfig pick;
|
StageConfig pick;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct RunePageConfig {
|
||||||
|
RunePageConfig();
|
||||||
|
RunePageConfig(const QJsonObject&);
|
||||||
|
operator QJsonObject() const;
|
||||||
|
|
||||||
|
QString name;
|
||||||
|
RunePage runepage;
|
||||||
|
};
|
||||||
|
|
||||||
struct RootConfig {
|
struct RootConfig {
|
||||||
RootConfig();
|
RootConfig();
|
||||||
RootConfig(const QJsonObject&);
|
RootConfig(const QJsonObject&);
|
||||||
|
@ -35,6 +45,7 @@ public:
|
||||||
std::shared_ptr<Config::PositionConfig> getPositionConfig(Position position);
|
std::shared_ptr<Config::PositionConfig> getPositionConfig(Position position);
|
||||||
|
|
||||||
std::vector<std::shared_ptr<PositionConfig>> positionConfigs;
|
std::vector<std::shared_ptr<PositionConfig>> positionConfigs;
|
||||||
|
std::vector<::RunePage*> runePages;
|
||||||
|
|
||||||
bool enabledAutoAccept;
|
bool enabledAutoAccept;
|
||||||
bool enabledSmiteWarn;
|
bool enabledSmiteWarn;
|
||||||
|
|
|
@ -25,6 +25,9 @@ public:
|
||||||
protected:
|
protected:
|
||||||
virtual void closeEvent(QCloseEvent* event) override;
|
virtual void closeEvent(QCloseEvent* event) override;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void requestTabChange(int tabindex);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void resetSaveTimer();
|
void resetSaveTimer();
|
||||||
|
|
||||||
|
@ -41,14 +44,12 @@ private slots:
|
||||||
|
|
||||||
void saveConfig();
|
void saveConfig();
|
||||||
void initDone();
|
void initDone();
|
||||||
signals:
|
|
||||||
void requestTabChange(int tabindex);
|
|
||||||
|
|
||||||
private:
|
|
||||||
// returns empty string on no match
|
// returns empty string on no match
|
||||||
void onPosChange(Position newpos); // to trigger the signal from a QObject
|
void onPosChange(Position newpos); // to trigger the signal from a QObject
|
||||||
void lolaaStatusChanged(LolAutoAccept::Status); // get triggerd, when the autoacceptor fails (lost connection)
|
void lolaaStatusChanged(LolAutoAccept::Status); // get triggerd, when the autoacceptor fails (lost connection)
|
||||||
|
|
||||||
|
private:
|
||||||
bool loading;
|
bool loading;
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
QTimer* saveTimer;
|
QTimer* saveTimer;
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class RuneManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ClientAPI;
|
||||||
|
class QListWidgetItem;
|
||||||
|
|
||||||
|
class RuneManager : public QWidget {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit RuneManager(QWidget* parent = nullptr);
|
||||||
|
~RuneManager();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void loadRunes();
|
||||||
|
void setRunesEnabled(bool enabled);
|
||||||
|
|
||||||
|
void clientRunePageRenamed(QListWidgetItem* item);
|
||||||
|
private:
|
||||||
|
Ui::RuneManager* ui;
|
||||||
|
std::shared_ptr<ClientAPI> client;
|
||||||
|
};
|
|
@ -4,6 +4,7 @@
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <QJsonObject>
|
||||||
// represents a runepage
|
// represents a runepage
|
||||||
struct RunePage {
|
struct RunePage {
|
||||||
public:
|
public:
|
||||||
|
@ -11,9 +12,13 @@ public:
|
||||||
uint32_t secondaryStyle = 0;
|
uint32_t secondaryStyle = 0;
|
||||||
std::vector<uint32_t> selectedAspects; // all selected aspekts (should be exactly 9)
|
std::vector<uint32_t> selectedAspects; // all selected aspekts (should be exactly 9)
|
||||||
|
|
||||||
|
RunePage();
|
||||||
bool operator==(const RunePage& rp) const;
|
bool operator==(const RunePage& rp) const;
|
||||||
|
|
||||||
operator bool() const; // check if this runepage is valid (this does not check semantic validity, only if the values are set as they supposed to be)
|
operator bool() const; // check if this runepage is valid (this does not check semantic validity, only if the values are set as they supposed to be)
|
||||||
|
|
||||||
|
operator QJsonObject() const;
|
||||||
|
RunePage(const QJsonObject& obj);
|
||||||
};
|
};
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream&, const RunePage&);
|
std::ostream& operator<<(std::ostream&, const RunePage&);
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include <QListWidget>
|
||||||
|
|
||||||
|
#include "clientapi.h"
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class RunePageList;
|
||||||
|
}
|
||||||
|
|
||||||
|
class DropEvent;
|
||||||
|
|
||||||
|
class RunePageList : public QListWidget {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
static const uint32_t RoleId = Qt::UserRole;
|
||||||
|
static const uint32_t RolePointer = Qt::UserRole + 1;
|
||||||
|
|
||||||
|
explicit RunePageList(QWidget* parent = nullptr);
|
||||||
|
~RunePageList();
|
||||||
|
|
||||||
|
constexpr void setClient(bool b) { isClient = b; }
|
||||||
|
constexpr void setOther(QListWidget* other) { this->other = other; }
|
||||||
|
|
||||||
|
void loadRunePages(const std::vector<ClientAPI::RunePage>& pages);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void dropEvent(QDropEvent* event) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::RunePageList* ui;
|
||||||
|
QListWidget* other = nullptr;
|
||||||
|
bool isClient;
|
||||||
|
};
|
|
@ -54,7 +54,9 @@ SOURCES += \
|
||||||
src/memoryimagecache.cpp \
|
src/memoryimagecache.cpp \
|
||||||
src/restclient.cpp \
|
src/restclient.cpp \
|
||||||
src/runedisplay.cpp \
|
src/runedisplay.cpp \
|
||||||
|
src/runemanager.cpp \
|
||||||
src/runepage.cpp \
|
src/runepage.cpp \
|
||||||
|
src/runepagelist.cpp \
|
||||||
src/settingstab.cpp \
|
src/settingstab.cpp \
|
||||||
src/stagesettings.cpp \
|
src/stagesettings.cpp \
|
||||||
thirdparty/Log/Log.cpp
|
thirdparty/Log/Log.cpp
|
||||||
|
@ -82,7 +84,9 @@ HEADERS += \
|
||||||
include/memoryimagecache.h \
|
include/memoryimagecache.h \
|
||||||
include/restclient.h \
|
include/restclient.h \
|
||||||
include/runedisplay.h \
|
include/runedisplay.h \
|
||||||
|
include/runemanager.h \
|
||||||
include/runepage.h \
|
include/runepage.h \
|
||||||
|
include/runepagelist.h \
|
||||||
include/settingstab.h \
|
include/settingstab.h \
|
||||||
include/stagesettings.h \
|
include/stagesettings.h \
|
||||||
thirdparty/Log/Log.h
|
thirdparty/Log/Log.h
|
||||||
|
@ -91,6 +95,8 @@ FORMS += \
|
||||||
ui/championsearch.ui \
|
ui/championsearch.ui \
|
||||||
ui/mainwindow.ui \
|
ui/mainwindow.ui \
|
||||||
ui/runedisplay.ui \
|
ui/runedisplay.ui \
|
||||||
|
ui/runemanager.ui \
|
||||||
|
ui/runepagelist.ui \
|
||||||
ui/settingstab.ui \
|
ui/settingstab.ui \
|
||||||
ui/stagesettings.ui
|
ui/stagesettings.ui
|
||||||
|
|
||||||
|
@ -116,7 +122,6 @@ unix {
|
||||||
appimg.depends = linuxdeploy-x86_64.AppImage $${TARGET} resources/lolautoaccept.png
|
appimg.depends = linuxdeploy-x86_64.AppImage $${TARGET} resources/lolautoaccept.png
|
||||||
appimg.commands = rm -rf AppDir ; \
|
appimg.commands = rm -rf AppDir ; \
|
||||||
mkdir -p AppDir/ts ; \
|
mkdir -p AppDir/ts ; \
|
||||||
cp ./resources/ts/*.qm ./AppDir/ts ; \
|
|
||||||
./linuxdeploy-x86_64.AppImage --appdir=AppDir -e lolautoaccept -i resources/lolautoaccept.png -d resources/lolautoaccept.desktop --output appimage
|
./linuxdeploy-x86_64.AppImage --appdir=AppDir -e lolautoaccept -i resources/lolautoaccept.png -d resources/lolautoaccept.desktop --output appimage
|
||||||
|
|
||||||
QMAKE_EXTRA_TARGETS += appimg linuxdeploy-x86_64.AppImage resources/lolautoaccept.png
|
QMAKE_EXTRA_TARGETS += appimg linuxdeploy-x86_64.AppImage resources/lolautoaccept.png
|
||||||
|
|
|
@ -19,7 +19,7 @@ Config::StageConfig::StageConfig() : enabled(false) {}
|
||||||
|
|
||||||
Config::StageConfig::StageConfig(const QJsonObject& j) {
|
Config::StageConfig::StageConfig(const QJsonObject& j) {
|
||||||
if(j["champ"].isString()) {
|
if(j["champ"].isString()) {
|
||||||
champs.push_back(getValue<std::string>(j, "champ", ""));
|
champs.push_back(getValue<std::string>(j, "champ"));
|
||||||
}
|
}
|
||||||
if(j["champs"].isArray()) {
|
if(j["champs"].isArray()) {
|
||||||
QJsonArray jchamps = j["champs"].toArray();
|
QJsonArray jchamps = j["champs"].toArray();
|
||||||
|
@ -71,9 +71,35 @@ Config::PositionConfig::operator QJsonObject() const {
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Config::RunePageConfig::RunePageConfig() {}
|
||||||
|
Config::RunePageConfig::RunePageConfig(const QJsonObject& j) {
|
||||||
|
name = getValue<QString>(j, "name");
|
||||||
|
runepage = getValue<::RunePage>(j, "runepage");
|
||||||
|
}
|
||||||
|
Config::RunePageConfig::operator QJsonObject() const {
|
||||||
|
QJsonObject out;
|
||||||
|
|
||||||
|
out["name"] = name;
|
||||||
|
out["runepage"] = static_cast<QJsonObject>(runepage);
|
||||||
|
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
Config::RootConfig::RootConfig() {}
|
Config::RootConfig::RootConfig() {}
|
||||||
|
|
||||||
Config::RootConfig::RootConfig(const QJsonObject& j) {
|
Config::RootConfig::RootConfig(const QJsonObject& j) {
|
||||||
|
if(j.contains("version")) {
|
||||||
|
int version = j["version"].toInt();
|
||||||
|
if(version > 1) {
|
||||||
|
// error
|
||||||
|
qCritical() << "config version is not known: " << version << " using the config might corrupt it.";
|
||||||
|
|
||||||
|
// TODO: make backup of config or something
|
||||||
|
}
|
||||||
|
|
||||||
|
// add migrations here if required
|
||||||
|
}
|
||||||
|
|
||||||
auto jposref = j["positions"];
|
auto jposref = j["positions"];
|
||||||
if(jposref.isArray()) {
|
if(jposref.isArray()) {
|
||||||
QJsonArray jpos = jposref.toArray();
|
QJsonArray jpos = jposref.toArray();
|
||||||
|
@ -105,6 +131,7 @@ Config::RootConfig::operator QJsonObject() const {
|
||||||
out.insert("enabledSmiteWarn", enabledSmiteWarn);
|
out.insert("enabledSmiteWarn", enabledSmiteWarn);
|
||||||
out.insert("enabledAutoWrite", enabledAutoWrite);
|
out.insert("enabledAutoWrite", enabledAutoWrite);
|
||||||
out.insert("autoWriteText", QString::fromStdString(autoWriteText));
|
out.insert("autoWriteText", QString::fromStdString(autoWriteText));
|
||||||
|
out.insert("version", 1);
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
@ -146,7 +173,9 @@ bool Config::load() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(doc.isObject()) {
|
if(doc.isObject()) {
|
||||||
|
// implicit cast
|
||||||
root = doc.object();
|
root = doc.object();
|
||||||
|
|
||||||
Log::info << "config loaded";
|
Log::info << "config loaded";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ int main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
qInfo() << "Hello, World!";
|
qInfo() << "Hello, World!";
|
||||||
qInfo() << "Using Locale: " << QLocale().name().toStdString();
|
qInfo() << "Using Locale: " << QLocale().name();
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
QTranslator translator;
|
QTranslator translator;
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), loading(true), ui(new Ui::MainWindow), saveTimer(new QTimer(this)), dd(QLocale().name().toStdString()),
|
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), loading(true), ui(new Ui::MainWindow), saveTimer(new QTimer(this)), dd(QLocale().name().toStdString()),
|
||||||
lolaa(conf.getConfig(), dd) {
|
lolaa(conf.getConfig(), dd) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
this->ui->runesPage->setLolAA(&lolaa);
|
|
||||||
|
|
||||||
QObject::connect(&lolaa, &LolAutoAccept::statusChanged, this, &MainWindow::lolaaStatusChanged);
|
QObject::connect(&lolaa, &LolAutoAccept::statusChanged, this, &MainWindow::lolaaStatusChanged);
|
||||||
QObject::connect(&lolaa, &LolAutoAccept::positionChanged, this, &MainWindow::onPosChange);
|
QObject::connect(&lolaa, &LolAutoAccept::positionChanged, this, &MainWindow::onPosChange);
|
||||||
|
@ -19,8 +18,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), loading(true), ui
|
||||||
|
|
||||||
ui->copyrightlabel->setText(ui->copyrightlabel->text().arg(LOLAA_VERSION));
|
ui->copyrightlabel->setText(ui->copyrightlabel->text().arg(LOLAA_VERSION));
|
||||||
|
|
||||||
lolaa.setOnRuneChangeFunc(std::bind(&RuneDisplay::setRunes, ui->runedisplay, std::placeholders::_1));
|
|
||||||
|
|
||||||
conf.load();
|
conf.load();
|
||||||
|
|
||||||
// for all tabs - set their config and datadragon
|
// for all tabs - set their config and datadragon
|
||||||
|
@ -89,9 +86,6 @@ void MainWindow::toggleMainswitch(bool state) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->runedisplay->setRuneMeta(lolaa.getRuneAspekts());
|
|
||||||
ui->runedisplay->setStyles(lolaa.getRuneStyles());
|
|
||||||
|
|
||||||
lolaa.run();
|
lolaa.run();
|
||||||
} else {
|
} else {
|
||||||
lolaa.stop();
|
lolaa.stop();
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
#include "runemanager.h"
|
||||||
|
#include "ui_runemanager.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QListWidgetItem>
|
||||||
|
|
||||||
|
#include "clientapi.h"
|
||||||
|
|
||||||
|
RuneManager::RuneManager(QWidget* parent) : QWidget(parent), ui(new Ui::RuneManager) {
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
ui->listClientRunes->setClient(true);
|
||||||
|
ui->listaaRunes->setClient(false);
|
||||||
|
ui->listClientRunes->setOther(ui->listaaRunes);
|
||||||
|
ui->listaaRunes->setOther(ui->listClientRunes);
|
||||||
|
|
||||||
|
loadRunes();
|
||||||
|
}
|
||||||
|
|
||||||
|
RuneManager::~RuneManager() {
|
||||||
|
delete this->ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RuneManager::loadRunes() {
|
||||||
|
if(!client) {
|
||||||
|
auto ca = ClientAccess::find();
|
||||||
|
|
||||||
|
if(ca) {
|
||||||
|
client = std::make_shared<ClientAPI>(*ca.get());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(client) {
|
||||||
|
// load runepages
|
||||||
|
const std::vector<ClientAPI::RunePage> runePages = client->getAllRunePages();
|
||||||
|
ui->listClientRunes->loadRunePages(runePages);
|
||||||
|
}
|
||||||
|
|
||||||
|
setRunesEnabled(!!client); // cast to bool
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RuneManager::setRunesEnabled(bool enabled) {
|
||||||
|
this->ui->lblClientRunes->setEnabled(enabled);
|
||||||
|
this->ui->lblaaRunes->setEnabled(enabled);
|
||||||
|
this->ui->listClientRunes->setEnabled(enabled);
|
||||||
|
this->ui->listaaRunes->setEnabled(enabled);
|
||||||
|
this->ui->btnDelete->setEnabled(enabled);
|
||||||
|
|
||||||
|
this->ui->btnRetry->setEnabled(!enabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RuneManager::clientRunePageRenamed(QListWidgetItem* item) {
|
||||||
|
uint32_t pageId = item->data(RunePageList::RoleId).toUInt();
|
||||||
|
const ::RunePage* page = (::RunePage*) item->data(RunePageList::RolePointer).toULongLong();
|
||||||
|
qDebug() << "edit page: " << pageId << "setname:" << item->text();
|
||||||
|
|
||||||
|
if(client) {
|
||||||
|
ClientAPI::RunePage newPage;
|
||||||
|
newPage.id = pageId;
|
||||||
|
newPage.name = item->text().toStdString();
|
||||||
|
newPage.runepage = *page;
|
||||||
|
|
||||||
|
if(!client->editRunePage(newPage)) {
|
||||||
|
// TODO: some error occured
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,13 @@
|
||||||
#include "runepage.h"
|
#include "runepage.h"
|
||||||
|
|
||||||
|
#include <QJsonArray>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include "json.h"
|
||||||
|
|
||||||
|
RunePage::RunePage() {}
|
||||||
|
|
||||||
bool RunePage::operator==(const RunePage& rp) const {
|
bool RunePage::operator==(const RunePage& rp) const {
|
||||||
if(primaryStyle == rp.primaryStyle && secondaryStyle == rp.secondaryStyle && selectedAspects.size() == rp.selectedAspects.size()) {
|
if(primaryStyle == rp.primaryStyle && secondaryStyle == rp.secondaryStyle && selectedAspects.size() == rp.selectedAspects.size()) {
|
||||||
return std::is_permutation(selectedAspects.begin(), selectedAspects.end(), rp.selectedAspects.begin());
|
return std::is_permutation(selectedAspects.begin(), selectedAspects.end(), rp.selectedAspects.begin());
|
||||||
|
@ -13,6 +19,37 @@ RunePage::operator bool() const {
|
||||||
return primaryStyle != 0 && secondaryStyle != 0 && selectedAspects.size() == 9;
|
return primaryStyle != 0 && secondaryStyle != 0 && selectedAspects.size() == 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RunePage::operator QJsonObject() const {
|
||||||
|
QJsonObject obj;
|
||||||
|
|
||||||
|
obj.insert("primary", (int) primaryStyle);
|
||||||
|
obj.insert("secondary", (int) secondaryStyle);
|
||||||
|
|
||||||
|
QJsonArray aspects;
|
||||||
|
for(uint32_t aspect : selectedAspects) {
|
||||||
|
aspects.push_back((int) aspect);
|
||||||
|
}
|
||||||
|
obj.insert("aspects", aspects);
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
RunePage::RunePage(const QJsonObject& obj) :
|
||||||
|
primaryStyle(getValue(obj, "primary", 0)),
|
||||||
|
secondaryStyle(getValue(obj, "secondary", 0))
|
||||||
|
{
|
||||||
|
if(obj.contains("aspects") && obj["aspects"].isArray() && obj["aspects"].toArray().size() == 9) {
|
||||||
|
selectedAspects.clear();
|
||||||
|
selectedAspects.reserve(9);
|
||||||
|
QJsonArray arr = obj["aspects"].toArray();
|
||||||
|
for(QJsonValueRef aspect : arr) {
|
||||||
|
if(aspect.isDouble()) {
|
||||||
|
selectedAspects.push_back(aspect.toDouble());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& str, const RunePage& rp) {
|
std::ostream& operator<<(std::ostream& str, const RunePage& rp) {
|
||||||
return str << "Primary: " << rp.primaryStyle << " Secondary: " << rp.secondaryStyle << " aspects: " << rp.selectedAspects.size();
|
return str << "Primary: " << rp.primaryStyle << " Secondary: " << rp.secondaryStyle << " aspects: " << rp.selectedAspects.size();
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
#include "runepagelist.h"
|
||||||
|
#include "ui_runepagelist.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
#include <QDropEvent>
|
||||||
|
#include <QMimeData>
|
||||||
|
|
||||||
|
RunePageList::RunePageList(QWidget* parent) : QListWidget(parent), ui(new Ui::RunePageList) {
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
RunePageList::~RunePageList() {
|
||||||
|
delete this->ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void RunePageList::loadRunePages(const std::vector<ClientAPI::RunePage>& pages) {
|
||||||
|
clear();
|
||||||
|
for(const ClientAPI::RunePage& rp : pages) {
|
||||||
|
QListWidgetItem* item = new QListWidgetItem(QString::fromStdString(rp.name));
|
||||||
|
item->setData(RoleId, (uint) rp.id);
|
||||||
|
item->setData(RolePointer, (qulonglong) new ::RunePage(rp.runepage));
|
||||||
|
item->setToolTip(QString("id: %0").arg(rp.id));
|
||||||
|
item->setFlags(item->flags() | Qt::ItemIsEditable);
|
||||||
|
addItem(item);
|
||||||
|
if(rp.isCurrent) {
|
||||||
|
item->setSelected(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void RunePageList::dropEvent(QDropEvent* event) {
|
||||||
|
qDebug() << "drop event";
|
||||||
|
if(event->source() == nullptr || event->source() != other) {
|
||||||
|
event->ignore();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto selected = other->selectedItems();
|
||||||
|
if(selected.size() != 1) {
|
||||||
|
event->ignore();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
qDebug() << "data: " << selected.at(0)->data(RoleId);
|
||||||
|
|
||||||
|
// compare rune pages for duplicates?
|
||||||
|
|
||||||
|
QListWidget::dropEvent(event);
|
||||||
|
}
|
513
ui/mainwindow.ui
513
ui/mainwindow.ui
|
@ -20,237 +20,254 @@
|
||||||
<string>LoL-Auto-Accept</string>
|
<string>LoL-Auto-Accept</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<property name="sizePolicy">
|
<layout class="QGridLayout" name="centralGridLayout">
|
||||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
<property name="sizeConstraint">
|
||||||
<horstretch>0</horstretch>
|
<enum>QLayout::SetDefaultConstraint</enum>
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="verticalLayoutWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>575</width>
|
|
||||||
<height>809</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout" columnstretch="2,1">
|
<item row="1" column="0">
|
||||||
<property name="sizeConstraint">
|
<widget class="QTabWidget" name="centralTabWidget">
|
||||||
<enum>QLayout::SetDefaultConstraint</enum>
|
<property name="sizePolicy">
|
||||||
</property>
|
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||||
<property name="leftMargin">
|
<horstretch>0</horstretch>
|
||||||
<number>6</number>
|
<verstretch>0</verstretch>
|
||||||
</property>
|
</sizepolicy>
|
||||||
<property name="topMargin">
|
</property>
|
||||||
<number>6</number>
|
<property name="currentIndex">
|
||||||
</property>
|
<number>0</number>
|
||||||
<property name="rightMargin">
|
</property>
|
||||||
<number>6</number>
|
<widget class="QWidget" name="autoacceptPage">
|
||||||
</property>
|
<attribute name="title">
|
||||||
<property name="bottomMargin">
|
<string>Auto Accept</string>
|
||||||
<number>6</number>
|
</attribute>
|
||||||
</property>
|
<layout class="QGridLayout" name="gridLayout" columnstretch="2,0">
|
||||||
<property name="spacing">
|
<property name="sizeConstraint">
|
||||||
<number>9</number>
|
<enum>QLayout::SetDefaultConstraint</enum>
|
||||||
</property>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="enableSmiteWarning">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Spam "smite" in the chat when there is not exactly 1 player with smite equiped in champ select</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable Smite Warning</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0" colspan="2">
|
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
|
||||||
<property name="tabPosition">
|
|
||||||
<enum>QTabWidget::North</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tabShape">
|
|
||||||
<enum>QTabWidget::Rounded</enum>
|
|
||||||
</property>
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="elideMode">
|
|
||||||
<enum>Qt::ElideNone</enum>
|
|
||||||
</property>
|
|
||||||
<property name="usesScrollButtons">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="tabsClosable">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<widget class="SettingsTab" name="tab_default">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>This Tab is used, when you are in a gamemode with no fixed roles</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="position" stdset="0">
|
<property name="leftMargin">
|
||||||
<UInt>0</UInt>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="title">
|
<property name="topMargin">
|
||||||
<string>Default</string>
|
<number>6</number>
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
<widget class="SettingsTab" name="tab_top">
|
|
||||||
<property name="position" stdset="0">
|
|
||||||
<UInt>1</UInt>
|
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<property name="rightMargin">
|
||||||
<iconset resource="../resources/res.qrc">
|
<number>6</number>
|
||||||
<normaloff>:/icons/top.svg</normaloff>:/icons/top.svg</iconset>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Top</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
<widget class="SettingsTab" name="tab_jgl">
|
|
||||||
<property name="position" stdset="0">
|
|
||||||
<UInt>2</UInt>
|
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<property name="bottomMargin">
|
||||||
<iconset resource="../resources/res.qrc">
|
<number>6</number>
|
||||||
<normaloff>:/icons/jgl.svg</normaloff>:/icons/jgl.svg</iconset>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Jungle</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
<widget class="SettingsTab" name="tab_mid">
|
|
||||||
<property name="position" stdset="0">
|
|
||||||
<UInt>3</UInt>
|
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<property name="spacing">
|
||||||
<iconset resource="../resources/res.qrc">
|
<number>9</number>
|
||||||
<normaloff>:/icons/mid.svg</normaloff>:/icons/mid.svg</iconset>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Middle</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
<widget class="SettingsTab" name="tab_bot">
|
|
||||||
<property name="position" stdset="0">
|
|
||||||
<UInt>4</UInt>
|
|
||||||
</property>
|
</property>
|
||||||
<attribute name="icon">
|
<item row="5" column="0">
|
||||||
<iconset resource="../resources/res.qrc">
|
<widget class="QCheckBox" name="enableAutoWrite">
|
||||||
<normaloff>:/icons/bot.svg</normaloff>:/icons/bot.svg</iconset>
|
<property name="toolTip">
|
||||||
</attribute>
|
<string>Write a Text as soon as you are in a champ select lobby.</string>
|
||||||
<attribute name="title">
|
</property>
|
||||||
<string>Bottom</string>
|
<property name="text">
|
||||||
</attribute>
|
<string>Auto Write</string>
|
||||||
</widget>
|
</property>
|
||||||
<widget class="SettingsTab" name="tab_sup">
|
</widget>
|
||||||
<property name="position" stdset="0">
|
</item>
|
||||||
<UInt>5</UInt>
|
<item row="0" column="1" rowspan="6">
|
||||||
</property>
|
<widget class="QLabel" name="copyrightlabel">
|
||||||
<attribute name="icon">
|
<property name="contextMenuPolicy">
|
||||||
<iconset resource="../resources/res.qrc">
|
<enum>Qt::NoContextMenu</enum>
|
||||||
<normaloff>:/icons/sup.svg</normaloff>:/icons/sup.svg</iconset>
|
</property>
|
||||||
</attribute>
|
<property name="text">
|
||||||
<attribute name="title">
|
<string><html><head/><body><p>Developed by
|
||||||
<string>Support</string>
|
MrBesen</p><p><a
|
||||||
</attribute>
|
href="https://git.mrbesen.de/MrBesen/lolautoaccept/releases"><span
|
||||||
</widget>
|
style=" text-decoration: underline;
|
||||||
|
color:#007af4;">Webseite</span></a></p><p>Version:
|
||||||
|
%1</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::RichText</enum>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::TextBrowserInteraction</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="mainswitch">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>This controls the connection to the LoL client. As long as this is off, no interactions with the LoL client take place.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mainswitch</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QCheckBox" name="enableSmiteWarning">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Spam "smite" in the chat when there is not exactly 1 player with smite equiped in champ select</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable Smite Warning</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" rowspan="2">
|
||||||
|
<widget class="QCheckBox" name="enableAll">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable LoL-Auto-Accept</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0" colspan="2">
|
||||||
|
<widget class="QTextEdit" name="autoWriteText">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>80</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="baseSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::WheelFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Sunken</enum>
|
||||||
|
</property>
|
||||||
|
<property name="lineWrapMode">
|
||||||
|
<enum>QTextEdit::NoWrap</enum>
|
||||||
|
</property>
|
||||||
|
<property name="acceptRichText">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::NoTextInteraction</set>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>autowriteText</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0" colspan="2">
|
||||||
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
|
<property name="tabPosition">
|
||||||
|
<enum>QTabWidget::North</enum>
|
||||||
|
</property>
|
||||||
|
<property name="tabShape">
|
||||||
|
<enum>QTabWidget::Rounded</enum>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="elideMode">
|
||||||
|
<enum>Qt::ElideNone</enum>
|
||||||
|
</property>
|
||||||
|
<property name="usesScrollButtons">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="tabsClosable">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="SettingsTab" name="tab_default">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>This Tab is used, when you are in a gamemode with no fixed roles</string>
|
||||||
|
</property>
|
||||||
|
<property name="position" stdset="0">
|
||||||
|
<UInt>0</UInt>
|
||||||
|
</property>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Default</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="SettingsTab" name="tab_top">
|
||||||
|
<property name="position" stdset="0">
|
||||||
|
<UInt>1</UInt>
|
||||||
|
</property>
|
||||||
|
<attribute name="icon">
|
||||||
|
<iconset resource="../resources/res.qrc">
|
||||||
|
<normaloff>:/icons/top.svg</normaloff>:/icons/top.svg</iconset>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Top</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="SettingsTab" name="tab_jgl">
|
||||||
|
<property name="position" stdset="0">
|
||||||
|
<UInt>2</UInt>
|
||||||
|
</property>
|
||||||
|
<attribute name="icon">
|
||||||
|
<iconset resource="../resources/res.qrc">
|
||||||
|
<normaloff>:/icons/jgl.svg</normaloff>:/icons/jgl.svg</iconset>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Jungle</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="SettingsTab" name="tab_mid">
|
||||||
|
<property name="position" stdset="0">
|
||||||
|
<UInt>3</UInt>
|
||||||
|
</property>
|
||||||
|
<attribute name="icon">
|
||||||
|
<iconset resource="../resources/res.qrc">
|
||||||
|
<normaloff>:/icons/mid.svg</normaloff>:/icons/mid.svg</iconset>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Middle</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="SettingsTab" name="tab_bot">
|
||||||
|
<property name="position" stdset="0">
|
||||||
|
<UInt>4</UInt>
|
||||||
|
</property>
|
||||||
|
<attribute name="icon">
|
||||||
|
<iconset resource="../resources/res.qrc">
|
||||||
|
<normaloff>:/icons/bot.svg</normaloff>:/icons/bot.svg</iconset>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Bottom</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
<widget class="SettingsTab" name="tab_sup">
|
||||||
|
<property name="position" stdset="0">
|
||||||
|
<UInt>5</UInt>
|
||||||
|
</property>
|
||||||
|
<attribute name="icon">
|
||||||
|
<iconset resource="../resources/res.qrc">
|
||||||
|
<normaloff>:/icons/sup.svg</normaloff>:/icons/sup.svg</iconset>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Support</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
<widget class="RuneManager" name="runesPage">
|
||||||
<item row="4" column="0" colspan="2">
|
<attribute name="title">
|
||||||
<widget class="QTextEdit" name="autoWriteText">
|
<string>Runes</string>
|
||||||
<property name="minimumSize">
|
</attribute>
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>80</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="baseSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="focusPolicy">
|
|
||||||
<enum>Qt::WheelFocus</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Sunken</enum>
|
|
||||||
</property>
|
|
||||||
<property name="lineWrapMode">
|
|
||||||
<enum>QTextEdit::NoWrap</enum>
|
|
||||||
</property>
|
|
||||||
<property name="acceptRichText">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>autowriteText</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</widget>
|
||||||
<item row="3" column="0">
|
</item>
|
||||||
<widget class="QCheckBox" name="enableAutoWrite">
|
</layout>
|
||||||
<property name="toolTip">
|
|
||||||
<string>Write a Text as soon as you are in a champ select lobby.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Auto Write</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="enableAll">
|
|
||||||
<property name="text">
|
|
||||||
<string>Enable LoL-Auto-Accept</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="mainswitch">
|
|
||||||
<property name="text">
|
|
||||||
<string>Mainswitch</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" rowspan="4">
|
|
||||||
<widget class="QLabel" name="copyrightlabel">
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::NoContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string><html><head/><body><p>Developed by MrBesen</p><p><a href="https://git.mrbesen.de/MrBesen/lolautoaccept/releases"><span style=" text-decoration: underline; color:#007af4;">Webseite</span></a></p><p>Version: %1</p></body></html></string>
|
|
||||||
</property>
|
|
||||||
<property name="textFormat">
|
|
||||||
<enum>Qt::RichText</enum>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing</set>
|
|
||||||
</property>
|
|
||||||
<property name="openExternalLinks">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::TextBrowserInteraction</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0" colspan="2">
|
|
||||||
<widget class="RuneDisplay" name="runedisplay" native="true"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menubar">
|
<widget class="QMenuBar" name="menubar">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
|
@ -272,16 +289,14 @@
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>RuneDisplay</class>
|
<class>RuneManager</class>
|
||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>runedisplay.h</header>
|
<header>runemanager.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
<slots>
|
|
||||||
<signal>applyRunes()</signal>
|
|
||||||
</slots>
|
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
<tabstop>centralTabWidget</tabstop>
|
||||||
<tabstop>mainswitch</tabstop>
|
<tabstop>mainswitch</tabstop>
|
||||||
<tabstop>enableAll</tabstop>
|
<tabstop>enableAll</tabstop>
|
||||||
<tabstop>enableSmiteWarning</tabstop>
|
<tabstop>enableSmiteWarning</tabstop>
|
||||||
|
@ -300,8 +315,8 @@
|
||||||
<slot>aatoggled(bool)</slot>
|
<slot>aatoggled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>25</x>
|
<x>36</x>
|
||||||
<y>88</y>
|
<y>128</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>393</x>
|
<x>393</x>
|
||||||
|
@ -316,8 +331,8 @@
|
||||||
<slot>toggleMainswitch(bool)</slot>
|
<slot>toggleMainswitch(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>88</x>
|
<x>99</x>
|
||||||
<y>38</y>
|
<y>94</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>1</x>
|
<x>1</x>
|
||||||
|
@ -341,22 +356,6 @@
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>runedisplay</sender>
|
|
||||||
<signal>applyRunes()</signal>
|
|
||||||
<receiver>MainWindow</receiver>
|
|
||||||
<slot>applyRunes()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>232</x>
|
|
||||||
<y>598</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>452</x>
|
|
||||||
<y>576</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
<connection>
|
||||||
<sender>enableSmiteWarning</sender>
|
<sender>enableSmiteWarning</sender>
|
||||||
<signal>clicked(bool)</signal>
|
<signal>clicked(bool)</signal>
|
||||||
|
@ -364,8 +363,8 @@
|
||||||
<slot>smitewarntoggled(bool)</slot>
|
<slot>smitewarntoggled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>191</x>
|
<x>202</x>
|
||||||
<y>111</y>
|
<y>162</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>201</x>
|
<x>201</x>
|
||||||
|
@ -380,8 +379,8 @@
|
||||||
<slot>autoWriteChanged()</slot>
|
<slot>autoWriteChanged()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>188</x>
|
<x>199</x>
|
||||||
<y>156</y>
|
<y>196</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>441</x>
|
<x>441</x>
|
||||||
|
@ -396,8 +395,8 @@
|
||||||
<slot>autoWriteChanged()</slot>
|
<slot>autoWriteChanged()</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>315</x>
|
<x>326</x>
|
||||||
<y>169</y>
|
<y>285</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>347</x>
|
<x>347</x>
|
||||||
|
@ -412,12 +411,12 @@
|
||||||
<slot>setEnabled(bool)</slot>
|
<slot>setEnabled(bool)</slot>
|
||||||
<hints>
|
<hints>
|
||||||
<hint type="sourcelabel">
|
<hint type="sourcelabel">
|
||||||
<x>94</x>
|
<x>105</x>
|
||||||
<y>156</y>
|
<y>196</y>
|
||||||
</hint>
|
</hint>
|
||||||
<hint type="destinationlabel">
|
<hint type="destinationlabel">
|
||||||
<x>86</x>
|
<x>97</x>
|
||||||
<y>168</y>
|
<y>285</y>
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
|
|
@ -0,0 +1,110 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>RuneManager</class>
|
||||||
|
<widget class="QWidget" name="RuneManager">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>498</width>
|
||||||
|
<height>654</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="RunePageList" name="listaaRunes">
|
||||||
|
<property name="dragEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="dragDropMode">
|
||||||
|
<enum>QAbstractItemView::DragDrop</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="lblClientRunes">
|
||||||
|
<property name="text">
|
||||||
|
<string>Runes in the Client</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QPushButton" name="btnDelete">
|
||||||
|
<property name="text">
|
||||||
|
<string>Delete</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="lblaaRunes">
|
||||||
|
<property name="text">
|
||||||
|
<string>Runes in the Autoacceptor</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="RunePageList" name="listClientRunes">
|
||||||
|
<property name="dragEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="dragDropMode">
|
||||||
|
<enum>QAbstractItemView::DragDrop</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QPushButton" name="btnRetry">
|
||||||
|
<property name="text">
|
||||||
|
<string>Retry</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>RunePageList</class>
|
||||||
|
<extends>QListWidget</extends>
|
||||||
|
<header>runepagelist.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>btnRetry</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>RuneManager</receiver>
|
||||||
|
<slot>loadRunes()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>223</x>
|
||||||
|
<y>28</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>544</x>
|
||||||
|
<y>55</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>listClientRunes</sender>
|
||||||
|
<signal>itemChanged(QListWidgetItem*)</signal>
|
||||||
|
<receiver>RuneManager</receiver>
|
||||||
|
<slot>clientRunePageRenamed(QListWidgetItem*)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>266</x>
|
||||||
|
<y>229</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>644</x>
|
||||||
|
<y>240</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
<slots>
|
||||||
|
<slot>loadRunes()</slot>
|
||||||
|
<slot>clientRunePageRenamed(QListWidgetItem*)</slot>
|
||||||
|
</slots>
|
||||||
|
</ui>
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>RunePageList</class>
|
||||||
|
<widget class="QListWidget" name="RunePageList">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
Loading…
Reference in New Issue