implement ui

This commit is contained in:
2026-04-20 20:33:37 +02:00
parent 498b97db20
commit 94123e93d6
19 changed files with 2312 additions and 19 deletions

35
src/ui/HeaderBar.h Normal file
View File

@@ -0,0 +1,35 @@
#pragma once
#include <vector>
#include <QWidget>
#include "Tick.h"
class QLabel;
class QPushButton;
class HeaderBar : public QWidget
{
Q_OBJECT
public:
explicit HeaderBar(QWidget* parent = nullptr);
public slots:
void onStateUpdated(Tick tick, int buildingBlocks, double gameSpeed);
signals:
void speedChanged(double multiplier);
private slots:
void onSpeedButton(int index);
private:
QLabel* m_timeLabel;
QLabel* m_blocksLabel;
std::vector<QPushButton*> m_speedButtons;
static const double kSpeeds[];
static const int kSpeedCount;
};