allow to re-load the config for the balancing app via button
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QScrollArea>
|
||||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
|
||||
@@ -19,17 +21,22 @@ class BalancingWindow : public QWidget
|
||||
|
||||
public:
|
||||
BalancingWindow(const BalancingConfig& balancingConfig,
|
||||
const GameConfig& gameConfig,
|
||||
GameConfig gameConfig,
|
||||
const std::string& configDir,
|
||||
const std::string& balancingConfigPath,
|
||||
QWidget* parent = nullptr);
|
||||
~BalancingWindow() override;
|
||||
|
||||
private slots:
|
||||
void pollStatuses();
|
||||
void reloadConfig();
|
||||
void startAll();
|
||||
void startArena(int index);
|
||||
|
||||
private:
|
||||
void updateStartAllButton();
|
||||
void populateArenas(const BalancingConfig& balancingConfig);
|
||||
void stopAllArenas();
|
||||
void updateButtons();
|
||||
|
||||
struct ArenaEntry
|
||||
{
|
||||
@@ -40,8 +47,12 @@ private:
|
||||
};
|
||||
|
||||
std::vector<ArenaEntry> m_arenas;
|
||||
const GameConfig& m_gameConfig;
|
||||
GameConfig m_gameConfig;
|
||||
std::string m_configDir;
|
||||
std::string m_balancingConfigPath;
|
||||
unsigned int m_nextSeed;
|
||||
QPushButton* m_reloadButton;
|
||||
QPushButton* m_startAllButton;
|
||||
QScrollArea* m_scrollArea;
|
||||
QTimer* m_pollTimer;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user