allow to inspect balancing arena

This commit is contained in:
2026-05-03 21:17:43 +02:00
parent afd8cd28fa
commit 3ef32ee6ba
13 changed files with 851 additions and 4 deletions

View File

@@ -0,0 +1,51 @@
#pragma once
#include <string>
#include <vector>
#include <QLabel>
#include <QPushButton>
#include <QTimer>
#include <QWidget>
#include "ArenaSimulation.h"
#include "VisualsConfig.h"
class ArenaView;
class InspectWindow : public QWidget
{
Q_OBJECT
public:
InspectWindow(ArenaSimulation* sim, const VisualsConfig* visuals,
const std::string& arenaName, QWidget* parent = nullptr);
signals:
void closed();
protected:
void closeEvent(QCloseEvent* event) override;
void keyPressEvent(QKeyEvent* event) override;
private slots:
void onSpeedButton(int index);
void onSpeedChanged(double multiplier);
void pollStatus();
private:
void updateInfoPanel(const ArenaStatus& status);
ArenaSimulation* m_sim;
ArenaView* m_arenaView;
std::vector<QPushButton*> m_speedButtons;
QLabel* m_team1Header;
QLabel* m_team2Header;
QLabel* m_team1Content;
QLabel* m_team2Content;
QTimer* m_pollTimer;
static const double kSpeeds[];
static const int kSpeedCount;
};