#include "mainwindow.h"
#include "ui_mainwindow.h"

#include "ibex.h"
#include "setimg.h"

int n;

MainWindow::MainWindow(QWidget *parent) :  QMainWindow(parent), ui(new Ui::MainWindow) {
    ui->setupUi(this);
}

void MainWindow::Init() {
    n=ui->nSpinBox->value();
}

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

void MainWindow::on_ButtonStart_clicked()
{

    Init();

    // Build the frame
    double xmin=-1.1;
    double xmax=1.1;
    double ymin=-1.1;
    double ymax=1.1;

    Frame* frame = new Frame(this,ui->graphicsView,xmin,xmax,ymin,ymax);

    // run set image
    SetImg setimg(*frame,n);
}
