mirror of
https://github.com/modelec/ihm.git
synced 2026-01-19 00:57:27 +01:00
PEDRO
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user