This commit is contained in:
ackimixs
2024-05-15 17:53:29 +02:00
parent 3c9bd01328
commit a484f8efc1
4 changed files with 16 additions and 0 deletions

View File

@@ -122,6 +122,12 @@ MainWindow::MainWindow(const char *address, int port, QWidget *parent) : QMainWi
this->tcpClient->sendMessage(message);
});
gifLabel = new QLabel(this);
gifMovie = new QMovie(":/path/to/your/gif.gif");
gifLabel->setMovie(gifMovie);
gifMovie->start();
this->stackedWidget = new QStackedWidget(centralWidget);
this->stackedWidget->addWidget(this->home);
this->stackedWidget->addWidget(this->homologation);
@@ -130,6 +136,7 @@ MainWindow::MainWindow(const char *address, int port, QWidget *parent) : QMainWi
this->stackedWidget->addWidget(this->testMode);
this->stackedWidget->addWidget(this->waintingForTirette);
this->stackedWidget->addWidget(this->inGame);
this->stackedWidget->addWidget(this->gifLabel);
this->mainLayout->addWidget(this->stackedWidget);
@@ -258,4 +265,7 @@ void MainWindow::handleMessage(const std::string& message)
else if (list[2] == "add point") {
this->inGame->addScore(std::stoi(list[3]));
}
else if (list[2] == "game mode" && list[3] == "gc") {
this->setWidgetNb(7);
}
}

View File

@@ -6,6 +6,8 @@
#include <QPixmap>
#include <QSettings>
#include <atomic>
#include <QMovie>
#include <QLabel>
#include "HomePage.h"
#include "Homologation.h"
@@ -71,4 +73,7 @@ private:
MyTCPClient* tcpClient;
QSettings* settings;
QLabel* gifLabel;
QMovie* gifMovie;
};

BIN
img/tenor.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

View File

@@ -7,5 +7,6 @@
<file>img/close.svg</file>
<file>img/close.png</file>
<file>img/ISEN-Nantes.png</file>
<file>img/tenor.gif</file>
</qresource>
</RCC>