mirror of
https://github.com/modelec/ihm.git
synced 2026-01-18 16:47:32 +01:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
InGame::InGame(QWidget *parent) : QWidget(parent) {
|
||||
this->mainLayout = new QVBoxLayout(this);
|
||||
this->mainLayout->setAlignment(Qt::AlignCenter);
|
||||
QPixmap bgPixmap(":/img/ISEN-Nantes.png");
|
||||
bgPixmap = bgPixmap.scaled(this->size(), Qt::KeepAspectRatioByExpanding);
|
||||
QPalette palette;
|
||||
palette.setBrush(QPalette::Window, QBrush(bgPixmap));
|
||||
this->setPalette(palette);
|
||||
this->pts = new QLabel("Points : 0", this);
|
||||
this->pts->setStyleSheet("font-size: 96px; color: black;");
|
||||
this->x = new QLabel("X : 0", this);
|
||||
|
||||
3
InGame.h
3
InGame.h
@@ -3,6 +3,9 @@
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <QTimer>
|
||||
#include <QPixmap>
|
||||
#include <QPalette>
|
||||
#include <QBrush>
|
||||
|
||||
class InGame : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <QStackedWidget>
|
||||
#include <QPixmap>
|
||||
#include <QSettings>
|
||||
#include <atomic>
|
||||
|
||||
#include "HomePage.h"
|
||||
#include "Homologation.h"
|
||||
|
||||
@@ -39,26 +39,32 @@ TeamChooser::TeamChooser(QWidget* parent) : QWidget(parent)
|
||||
this->bottomLayout->addWidget(spawnPoint6, 0, Qt::AlignBottom | Qt::AlignRight);
|
||||
|
||||
connect(this->spawnPoint1, &QPushButton::pressed, this, [=]() {
|
||||
qDebug() << "Spawn point 1 clicked";
|
||||
spawnPointClicked(1);
|
||||
});
|
||||
|
||||
connect(this->spawnPoint2, &QPushButton::pressed, this, [=]() {
|
||||
qDebug() << "Spawn point 2 clicked";
|
||||
spawnPointClicked(2);
|
||||
});
|
||||
|
||||
connect(this->spawnPoint3, &QPushButton::pressed, this, [=]() {
|
||||
qDebug() << "Spawn point 3 clicked";
|
||||
spawnPointClicked(3);
|
||||
});
|
||||
|
||||
connect(this->spawnPoint4, &QPushButton::pressed, this, [=]() {
|
||||
qDebug() << "Spawn point 4 clicked";
|
||||
spawnPointClicked(4);
|
||||
});
|
||||
|
||||
connect(this->spawnPoint5, &QPushButton::pressed, this, [=]() {
|
||||
qDebug() << "Spawn point 5 clicked";
|
||||
spawnPointClicked(5);
|
||||
});
|
||||
|
||||
connect(this->spawnPoint6, &QPushButton::pressed, this, [=]() {
|
||||
qDebug() << "Spawn point 6 clicked";
|
||||
spawnPointClicked(6);
|
||||
});
|
||||
}
|
||||
|
||||
BIN
img/ISEN-Nantes.png
Normal file
BIN
img/ISEN-Nantes.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
11
main.cpp
11
main.cpp
@@ -2,12 +2,23 @@
|
||||
#include <QApplication>
|
||||
#include <QObject>
|
||||
#include <QThread>
|
||||
#include <csignal>
|
||||
|
||||
#include "MainWindow.h"
|
||||
|
||||
void signalHandler(int sigmum) {
|
||||
std::cout << "Inteerupt signal (" << sigmum << ") received.\n";
|
||||
|
||||
QApplication::quit();
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
||||
QApplication a(argc, argv);
|
||||
|
||||
signal(SIGTERM, signalHandler);
|
||||
signal(SIGINT, signalHandler);
|
||||
|
||||
DisplayMode mode;
|
||||
|
||||
if (argc >= 2)
|
||||
|
||||
@@ -6,5 +6,6 @@
|
||||
<file>img/table.jpg</file>
|
||||
<file>img/close.svg</file>
|
||||
<file>img/close.png</file>
|
||||
<file>img/ISEN-Nantes.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
Reference in New Issue
Block a user