forked from MrBesen/lolautoaccept
rune manager preperations
This commit is contained in:
parent
6ffdf23085
commit
ef36280894
|
@ -4,6 +4,7 @@
|
|||
#include <QJsonObject>
|
||||
|
||||
#include "position.h"
|
||||
#include "runepage.h"
|
||||
|
||||
class Config {
|
||||
public:
|
||||
|
@ -27,6 +28,15 @@ public:
|
|||
StageConfig pick;
|
||||
};
|
||||
|
||||
struct RunePageConfig {
|
||||
RunePageConfig();
|
||||
RunePageConfig(const QJsonObject&);
|
||||
operator QJsonObject() const;
|
||||
|
||||
QString name;
|
||||
RunePage runepage;
|
||||
};
|
||||
|
||||
struct RootConfig {
|
||||
RootConfig();
|
||||
RootConfig(const QJsonObject&);
|
||||
|
@ -35,6 +45,7 @@ public:
|
|||
std::shared_ptr<Config::PositionConfig> getPositionConfig(Position position);
|
||||
|
||||
std::vector<std::shared_ptr<PositionConfig>> positionConfigs;
|
||||
std::vector<::RunePage*> runePages;
|
||||
|
||||
bool enabledAutoAccept;
|
||||
bool enabledSmiteWarn;
|
||||
|
|
|
@ -25,6 +25,9 @@ public:
|
|||
protected:
|
||||
virtual void closeEvent(QCloseEvent* event) override;
|
||||
|
||||
signals:
|
||||
void requestTabChange(int tabindex);
|
||||
|
||||
public slots:
|
||||
void resetSaveTimer();
|
||||
|
||||
|
@ -41,14 +44,12 @@ private slots:
|
|||
|
||||
void saveConfig();
|
||||
void initDone();
|
||||
signals:
|
||||
void requestTabChange(int tabindex);
|
||||
|
||||
private:
|
||||
// returns empty string on no match
|
||||
void onPosChange(Position newpos); // to trigger the signal from a QObject
|
||||
void lolaaStatusChanged(LolAutoAccept::Status); // get triggerd, when the autoacceptor fails (lost connection)
|
||||
|
||||
private:
|
||||
bool loading;
|
||||
Ui::MainWindow *ui;
|
||||
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 <vector>
|
||||
|
||||
#include <QJsonObject>
|
||||
// represents a runepage
|
||||
struct RunePage {
|
||||
public:
|
||||
|
@ -11,9 +12,13 @@ public:
|
|||
uint32_t secondaryStyle = 0;
|
||||
std::vector<uint32_t> selectedAspects; // all selected aspekts (should be exactly 9)
|
||||
|
||||
RunePage();
|
||||
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 QJsonObject() const;
|
||||
RunePage(const QJsonObject& obj);
|
||||
};
|
||||
|
||||
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/restclient.cpp \
|
||||
src/runedisplay.cpp \
|
||||
src/runemanager.cpp \
|
||||
src/runepage.cpp \
|
||||
src/runepagelist.cpp \
|
||||
src/settingstab.cpp \
|
||||
src/stagesettings.cpp \
|
||||
thirdparty/Log/Log.cpp
|
||||
|
@ -82,7 +84,9 @@ HEADERS += \
|
|||
include/memoryimagecache.h \
|
||||
include/restclient.h \
|
||||
include/runedisplay.h \
|
||||
include/runemanager.h \
|
||||
include/runepage.h \
|
||||
include/runepagelist.h \
|
||||
include/settingstab.h \
|
||||
include/stagesettings.h \
|
||||
thirdparty/Log/Log.h
|
||||
|
@ -91,6 +95,8 @@ FORMS += \
|
|||
ui/championsearch.ui \
|
||||
ui/mainwindow.ui \
|
||||
ui/runedisplay.ui \
|
||||
ui/runemanager.ui \
|
||||
ui/runepagelist.ui \
|
||||
ui/settingstab.ui \
|
||||
ui/stagesettings.ui
|
||||
|
||||
|
@ -116,7 +122,6 @@ unix {
|
|||
appimg.depends = linuxdeploy-x86_64.AppImage $${TARGET} resources/lolautoaccept.png
|
||||
appimg.commands = rm -rf AppDir ; \
|
||||
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
|
||||
|
||||
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) {
|
||||
if(j["champ"].isString()) {
|
||||
champs.push_back(getValue<std::string>(j, "champ", ""));
|
||||
champs.push_back(getValue<std::string>(j, "champ"));
|
||||
}
|
||||
if(j["champs"].isArray()) {
|
||||
QJsonArray jchamps = j["champs"].toArray();
|
||||
|
@ -71,9 +71,35 @@ Config::PositionConfig::operator QJsonObject() const {
|
|||
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(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"];
|
||||
if(jposref.isArray()) {
|
||||
QJsonArray jpos = jposref.toArray();
|
||||
|
@ -105,6 +131,7 @@ Config::RootConfig::operator QJsonObject() const {
|
|||
out.insert("enabledSmiteWarn", enabledSmiteWarn);
|
||||
out.insert("enabledAutoWrite", enabledAutoWrite);
|
||||
out.insert("autoWriteText", QString::fromStdString(autoWriteText));
|
||||
out.insert("version", 1);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
@ -146,7 +173,9 @@ bool Config::load() {
|
|||
return false;
|
||||
}
|
||||
if(doc.isObject()) {
|
||||
// implicit cast
|
||||
root = doc.object();
|
||||
|
||||
Log::info << "config loaded";
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ int main(int argc, char** argv) {
|
|||
}
|
||||
|
||||
qInfo() << "Hello, World!";
|
||||
qInfo() << "Using Locale: " << QLocale().name().toStdString();
|
||||
qInfo() << "Using Locale: " << QLocale().name();
|
||||
|
||||
QApplication app(argc, argv);
|
||||
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()),
|
||||
lolaa(conf.getConfig(), dd) {
|
||||
ui->setupUi(this);
|
||||
this->ui->runesPage->setLolAA(&lolaa);
|
||||
|
||||
QObject::connect(&lolaa, &LolAutoAccept::statusChanged, this, &MainWindow::lolaaStatusChanged);
|
||||
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));
|
||||
|
||||
lolaa.setOnRuneChangeFunc(std::bind(&RuneDisplay::setRunes, ui->runedisplay, std::placeholders::_1));
|
||||
|
||||
conf.load();
|
||||
|
||||
// for all tabs - set their config and datadragon
|
||||
|
@ -89,9 +86,6 @@ void MainWindow::toggleMainswitch(bool state) {
|
|||
return;
|
||||
}
|
||||
|
||||
ui->runedisplay->setRuneMeta(lolaa.getRuneAspekts());
|
||||
ui->runedisplay->setStyles(lolaa.getRuneStyles());
|
||||
|
||||
lolaa.run();
|
||||
} else {
|
||||
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 <QJsonArray>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "json.h"
|
||||
|
||||
RunePage::RunePage() {}
|
||||
|
||||
bool RunePage::operator==(const RunePage& rp) const {
|
||||
if(primaryStyle == rp.primaryStyle && secondaryStyle == rp.secondaryStyle && selectedAspects.size() == rp.selectedAspects.size()) {
|
||||
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;
|
||||
}
|
||||
|
||||
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) {
|
||||
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>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<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>
|
||||
<layout class="QGridLayout" name="centralGridLayout">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="2,1">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>9</number>
|
||||
</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>
|
||||
<item row="1" column="0">
|
||||
<widget class="QTabWidget" name="centralTabWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="autoacceptPage">
|
||||
<attribute name="title">
|
||||
<string>Auto Accept</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="2,0">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetDefaultConstraint</enum>
|
||||
</property>
|
||||
<property name="position" stdset="0">
|
||||
<UInt>0</UInt>
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Default</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="SettingsTab" name="tab_top">
|
||||
<property name="position" stdset="0">
|
||||
<UInt>1</UInt>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</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 name="rightMargin">
|
||||
<number>6</number>
|
||||
</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 name="bottomMargin">
|
||||
<number>6</number>
|
||||
</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 name="spacing">
|
||||
<number>9</number>
|
||||
</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>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="enableAutoWrite">
|
||||
<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="0" column="1" rowspan="6">
|
||||
<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="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>
|
||||
</item>
|
||||
<item row="4" 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::LinksAccessibleByMouse|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>autowriteText</string>
|
||||
</property>
|
||||
<widget class="RuneManager" name="runesPage">
|
||||
<attribute name="title">
|
||||
<string>Runes</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="enableAutoWrite">
|
||||
<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>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
|
@ -272,16 +289,14 @@
|
|||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>RuneDisplay</class>
|
||||
<class>RuneManager</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>runedisplay.h</header>
|
||||
<header>runemanager.h</header>
|
||||
<container>1</container>
|
||||
<slots>
|
||||
<signal>applyRunes()</signal>
|
||||
</slots>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>centralTabWidget</tabstop>
|
||||
<tabstop>mainswitch</tabstop>
|
||||
<tabstop>enableAll</tabstop>
|
||||
<tabstop>enableSmiteWarning</tabstop>
|
||||
|
@ -300,8 +315,8 @@
|
|||
<slot>aatoggled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>25</x>
|
||||
<y>88</y>
|
||||
<x>36</x>
|
||||
<y>128</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>393</x>
|
||||
|
@ -316,8 +331,8 @@
|
|||
<slot>toggleMainswitch(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>88</x>
|
||||
<y>38</y>
|
||||
<x>99</x>
|
||||
<y>94</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>1</x>
|
||||
|
@ -341,22 +356,6 @@
|
|||
</hint>
|
||||
</hints>
|
||||
</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>
|
||||
<sender>enableSmiteWarning</sender>
|
||||
<signal>clicked(bool)</signal>
|
||||
|
@ -364,8 +363,8 @@
|
|||
<slot>smitewarntoggled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>191</x>
|
||||
<y>111</y>
|
||||
<x>202</x>
|
||||
<y>162</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>201</x>
|
||||
|
@ -380,8 +379,8 @@
|
|||
<slot>autoWriteChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>188</x>
|
||||
<y>156</y>
|
||||
<x>199</x>
|
||||
<y>196</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>441</x>
|
||||
|
@ -396,8 +395,8 @@
|
|||
<slot>autoWriteChanged()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>315</x>
|
||||
<y>169</y>
|
||||
<x>326</x>
|
||||
<y>285</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>347</x>
|
||||
|
@ -412,12 +411,12 @@
|
|||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>94</x>
|
||||
<y>156</y>
|
||||
<x>105</x>
|
||||
<y>196</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>86</x>
|
||||
<y>168</y>
|
||||
<x>97</x>
|
||||
<y>285</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</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