Skip to content

Commit

Permalink
Refs issue #43: removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Amadeus committed Jun 9, 2018
1 parent f6a17f6 commit 63a89b0
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,23 +243,6 @@ void MainWindow::takePicture() {
}
}

/*void MainWindow::readInputPicture(QString fileName)
{
auto display = QApplication::desktop()->screenGeometry();
auto image = QImage(fileName).scaled(display.size(), Qt::KeepAspectRatio);
auto mosaic = FloydSteinberg(*m_molluscPalette);
m_result = mosaic.createMosaic(image, m_maxNumOfMolluscs);
m_scene->removeItem(m_pixmapItem);
delete m_pixmapItem;
auto offset = (display.width() - m_result->width()) / 2;
m_scene->setSceneRect(-offset, 0, display.width(), display.height());
m_pixmapItem = m_scene->addPixmap(QPixmap::fromImage(*m_result));
m_cameraButton->move(display.width() - m_cameraButton->iconSize().width() - offset, display.height() - m_cameraButton->iconSize().height());
}/**/

void MainWindow::takeSelfie()
{
takePicture();
Expand Down Expand Up @@ -308,19 +291,9 @@ void MainWindow::processAndShowPicture(std::shared_ptr<QImage> inputImage) {
m_idImage = new QImage(image.width(), image.height(), image.format());
m_molluscs = Painter::paint(molluscPositions, m_molluscPalette, *m_result, *m_idImage);

//m_scene->removeItem(m_pixmapItem);
//delete m_pixmapItem;
auto offset = (display.width() - m_result->width()) / 2;
//m_scene->setSceneRect(-offset, 0, display.width(), display.height());
//m_pixmapItem = m_scene->addPixmap(QPixmap::fromImage(*m_result));
m_resultLabel->setFixedSize(display.width(), display.height());
m_resultLabel->setPixmap(QPixmap::fromImage(*m_result));

m_cameraButton->move(display.width() - m_cameraButton->iconSize().width() - offset, display.height() - m_cameraButton->iconSize().height());

/*auto imageSize = m_result->size();
auto scene = new QGraphicsScene(0, 0, imageSize.width(), imageSize.height(), this);
scene->addPixmap(QPixmap::fromImage(*m_result));
m_view->setScene(scene);/**/
}

0 comments on commit 63a89b0

Please sign in to comment.