#include "mainwindow.h"
#include "sailboat.h"
#include "ui_mainwindow.h"
double dt=0;  //variable globale,

MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
    ui(new Ui::MainWindow)
{   ui->setupUi(this);
    connect(ui->ButtonStart,SIGNAL(clicked()),ui->widgetSimu,SLOT(Start()));

    QTimer *timer = new QTimer(this);
    timer = new QTimer(this);
    connect(timer, SIGNAL(timeout()),ui->widgetSimu,SLOT(Clock()));
    timer->start(2); // = interruption toutes les 2 ms
    setWindowTitle("Sailboat simulator");
}

MainWindow::~MainWindow()
{
    delete ui;
}
