2022-04-20 00:54:10 +02:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
2022-04-21 00:47:57 +02:00
|
|
|
#include <thread>
|
|
|
|
|
2022-04-24 01:27:46 +02:00
|
|
|
#include "config.h"
|
2022-04-23 00:39:45 +02:00
|
|
|
#include "datadragon.h"
|
2022-04-21 00:47:57 +02:00
|
|
|
#include "lolautoaccept.h"
|
2022-04-20 00:54:10 +02:00
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
namespace Ui { class MainWindow; }
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
2023-09-02 11:55:02 +02:00
|
|
|
class QMessageBox;
|
2022-12-16 23:09:24 +01:00
|
|
|
class QTimer;
|
|
|
|
|
2023-08-27 16:51:02 +02:00
|
|
|
class LoadingWindow;
|
2023-09-05 22:20:06 +02:00
|
|
|
class X11Helper;
|
2023-08-27 16:51:02 +02:00
|
|
|
|
2022-12-16 23:09:24 +01:00
|
|
|
|
2022-04-21 00:47:57 +02:00
|
|
|
class MainWindow : public QMainWindow {
|
2022-04-20 00:54:10 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-07-04 22:59:48 +02:00
|
|
|
MainWindow(QWidget *parent = nullptr);
|
2022-04-20 00:54:10 +02:00
|
|
|
~MainWindow();
|
|
|
|
|
2022-04-24 01:27:46 +02:00
|
|
|
protected:
|
|
|
|
virtual void closeEvent(QCloseEvent* event) override;
|
|
|
|
|
2023-04-23 19:13:49 +02:00
|
|
|
signals:
|
|
|
|
void requestTabChange(int tabindex);
|
|
|
|
|
2022-12-16 23:09:24 +01:00
|
|
|
public slots:
|
|
|
|
void resetSaveTimer();
|
|
|
|
|
2022-04-21 00:47:57 +02:00
|
|
|
private slots:
|
2023-08-27 16:51:02 +02:00
|
|
|
void loadingStatus(float);
|
|
|
|
|
2023-09-05 22:20:06 +02:00
|
|
|
void toggleLeagueVisibility();
|
|
|
|
|
2022-04-21 19:33:46 +02:00
|
|
|
void toggleMainswitch(bool);
|
|
|
|
void aatoggled(bool);
|
2022-08-26 13:47:21 +02:00
|
|
|
void smitewarntoggled(bool);
|
2022-07-04 00:30:00 +02:00
|
|
|
|
|
|
|
void tabtoggled(Position, LolAutoAccept::State, bool);
|
|
|
|
void tabchanged(Position, LolAutoAccept::State);
|
2022-04-21 00:47:57 +02:00
|
|
|
|
2022-09-21 13:47:08 +02:00
|
|
|
void autoWriteChanged();
|
2022-07-09 01:01:51 +02:00
|
|
|
|
2022-12-16 23:09:24 +01:00
|
|
|
void saveConfig();
|
|
|
|
void initDone();
|
2022-07-04 22:59:48 +02:00
|
|
|
|
2022-04-23 00:39:45 +02:00
|
|
|
// returns empty string on no match
|
2022-07-04 22:59:48 +02:00
|
|
|
void onPosChange(Position newpos); // to trigger the signal from a QObject
|
2023-02-26 13:50:57 +01:00
|
|
|
void lolaaStatusChanged(LolAutoAccept::Status); // get triggerd, when the autoacceptor fails (lost connection)
|
2022-04-23 00:39:45 +02:00
|
|
|
|
2023-04-23 19:13:49 +02:00
|
|
|
private:
|
2022-12-16 23:09:24 +01:00
|
|
|
bool loading;
|
2022-04-20 00:54:10 +02:00
|
|
|
Ui::MainWindow *ui;
|
2022-12-16 23:09:24 +01:00
|
|
|
QTimer* saveTimer;
|
2022-04-21 00:47:57 +02:00
|
|
|
std::thread lolaathread;
|
2022-04-23 00:39:45 +02:00
|
|
|
DataDragon dd;
|
2022-04-24 01:27:46 +02:00
|
|
|
Config conf;
|
2022-07-04 22:59:48 +02:00
|
|
|
LolAutoAccept lolaa;
|
2023-08-27 16:51:02 +02:00
|
|
|
LoadingWindow* lwin;
|
2023-09-02 11:55:02 +02:00
|
|
|
QMessageBox* dodgeQuestion;
|
2023-09-05 22:20:06 +02:00
|
|
|
X11Helper* x11Helper;
|
2022-04-20 00:54:10 +02:00
|
|
|
};
|
2022-04-21 00:47:57 +02:00
|
|
|
|
2022-04-20 00:54:10 +02:00
|
|
|
#endif // MAINWINDOW_H
|