-
Notifications
You must be signed in to change notification settings - Fork 0
/
window.cpp
41 lines (31 loc) · 813 Bytes
/
window.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
// CPE - 4ETI - Maj.Image - Programmation en C++ - 09/03/2018
// CARNEIRO ESTEVES, Sophie
// FOLETTO PIMENTA, Pedro
// TP 2
#include "window.hpp"
#include "render_area.hpp"
#include "ui_mainwindow.h"
#include <iostream>
window::window(QWidget *parent)
:QMainWindow(parent),ui(new Ui::MainWindow),render(new render_area)
{
ui->setupUi(this);
ui->layout_scene->addWidget(render);
render->setFocus();
render->setUi(ui);
//Connection with signals
connect(ui->quit,SIGNAL(clicked()),this,SLOT(action_quit()));
connect(ui->start,SIGNAL(clicked()),this,SLOT(action_start()));
}
window::~window()
{}
void window::action_quit()
{
close();
}
void window::action_start()
{
//debug
//std::cout << "\n\n\n" << "LE JEU A COMMENCE!" << "\n\n\n";
render->start_game();
}