mirror of
https://github.com/modelec/ihm.git
synced 2026-01-18 16:47:32 +01:00
40 lines
772 B
C++
40 lines
772 B
C++
#pragma once
|
|
#include <QLabel>
|
|
#include <QVBoxLayout>
|
|
#include <QWidget>
|
|
#include <QTimer>
|
|
|
|
class InGame : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit InGame(QWidget* parent = nullptr);
|
|
|
|
void updateScode(int score) const;
|
|
|
|
void updatePos(std::string x, std::string y) const;
|
|
|
|
void updateSpeed(std::string speed) const;
|
|
|
|
void updateAngle(std::string angle) const;
|
|
|
|
void updateTime();
|
|
|
|
void showEvent(QShowEvent* event) override;
|
|
|
|
signals:
|
|
void askTCPServer(const std::string& message);
|
|
|
|
private:
|
|
QLabel* pts;
|
|
QLabel* x;
|
|
QLabel* y;
|
|
QLabel* time;
|
|
QLabel* speed;
|
|
QLabel* angle;
|
|
QVBoxLayout* mainLayout;
|
|
QHBoxLayout* posAndTimeLayout;
|
|
QVBoxLayout* posLayout;
|
|
QTimer* timer;
|
|
int timeCounter = 0;
|
|
};
|