MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); view = new QGraphicsView; scene = new ExQGraphicsScene; inputParams = new InputParamsDialog; exportImageDialog = new ExportImageDialog; progressBar = new ProgressBarWidget; this->zoomFactor=1.2; this->load(); QObject::connect(this->scene,SIGNAL(mouse_pressed()),this,SLOT(moused())); QObject::connect(inputParams,SIGNAL(accepted()),this,SLOT(draw())); QObject::connect(ui->closeBtn,SIGNAL(clicked()),this,SLOT(close())); QObject::connect(ui->closeBtn,SIGNAL(clicked()),this->view,SLOT(close())); QObject::connect(ui->zoomInBtn,SIGNAL(clicked()),this,SLOT(zoomIn())); QObject::connect(ui->zoomOutBtn,SIGNAL(clicked()),this,SLOT(zoomOut())); QObject::connect(ui->exportBtn,SIGNAL(clicked()),this,SLOT(exportCalled())); QObject::connect(exportImageDialog,SIGNAL(accepted()),this,SLOT(exportImage())); QObject::connect(exportImageDialog,SIGNAL(accepted()),this,SLOT(showProgressBar())); QObject::connect(exportImageDialog,SIGNAL(accepted()),this->progressBar,SLOT(start())); }
void Perfil::newFunction(double ymax, int modo) { if (firstPainted) { function->hide(); ui->hLayoutFunction->removeWidget(function); } if (modo == Y_MODE) function = new Function(this, hist, 0, imagen.nDiagonal() - 1, -ymax, ymax, modo); //para derivadas else function = new Function(this, hist, 0, imagen.nDiagonal() - 1, 0, ymax, modo); //para perfiles function->show(); ui->hLayoutFunction->addWidget(function); connect(function, SIGNAL(moused()), this, SLOT(updatePunto())); }