40 lines
763 B
C++
40 lines
763 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include <QFrame>
|
|
#include <QLabel>
|
|
#include <QPushButton>
|
|
|
|
#include "ArenaSimulation.h"
|
|
|
|
class ArenaWidget : public QFrame
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ArenaWidget(const std::string& arenaName, QWidget* parent = nullptr);
|
|
|
|
void updateStatus(const ArenaStatus& status);
|
|
void startSimulation();
|
|
void resetToGrey();
|
|
|
|
signals:
|
|
void startRequested();
|
|
void inspectRequested();
|
|
|
|
private:
|
|
void buildLayout(const std::string& arenaName);
|
|
|
|
QLabel* m_titleLabel;
|
|
QLabel* m_team1Header;
|
|
QLabel* m_team2Header;
|
|
QLabel* m_team1Content;
|
|
QLabel* m_team2Content;
|
|
QPushButton* m_inspectButton;
|
|
QPushButton* m_startButton;
|
|
bool m_running;
|
|
bool m_wasFinished;
|
|
};
|