-
Notifications
You must be signed in to change notification settings - Fork 0
/
mafenetre.cpp
executable file
·55 lines (36 loc) · 1.35 KB
/
mafenetre.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "mafenetre.h"
#include <QVBoxLayout>
#include <QtGui>
MaFenetre::MaFenetre() : QWidget()
{
setFixedSize(300, 300);
m_but = new QPushButton("Quitter", this);
m_but->move(200,250);
m_regles = new QPushButton("Regle du jeu", this);
m_regles->move(90,200);
QTabWidget *onglet = new QTabWidget(this);
onglet->setGeometry(30, 20, 240, 160);
InfoJoueur = new QWidget;
Jouer= new QWidget;
//Jouer
m_2j= new QPushButton("Partie 2 joueurs");
QVBoxLayout *vbox1 = new QVBoxLayout;
vbox1->addWidget(m_2j);
Jouer->setLayout(vbox1);
//Jouer
//Info Joueur
enregistrer= new QPushButton("Enregistrer");
PseudoJoueur = new QLineEdit("Entrez votre pseudo");
QVBoxLayout *vbox2 = new QVBoxLayout;
vbox2->addWidget(PseudoJoueur);
vbox2->addWidget(enregistrer);
InfoJoueur->setLayout(vbox2);
//Info Joueur
onglet->addTab(InfoJoueur, "Info");
onglet->addTab(Jouer, "Jouer");
QObject::connect(m_regles, SIGNAL(clicked()), this, SLOT(monAction()));
QObject::connect(m_but, SIGNAL(clicked()), qApp, SLOT(quit()));
QObject::connect(PseudoJoueur, SIGNAL(selectionChanged()), this, SLOT(enleverText()));
QObject::connect(m_2j, SIGNAL(clicked()), this, SLOT(afficherJeux2j()));
QObject::connect(enregistrer, SIGNAL(clicked()), this, SLOT(enregistrerPseudo()));
}