src/ChildWidget.cpp
/**
 * @brief reload current image/page from image file
  */
@brief reload current image/page from image file
@brief reload current image / page from image file
bool ChildWidget::reloadImg() {
  if (DMESS > 10) qDebug() << Q_FUNC_INFO;
  imageScene->removeItem(static_cast<QGraphicsItem*>(imageItem));
  delete imageItem;
  QImage image;
  if (pageWidget->isHidden()) {  
    image.load(imageFile);
  } else {  
    PIX    *pix;
    pix = pixReadTiff(imageFile.toLocal8Bit().data(), currPage);
    image = TessTools::PIX2qImage(pix);
    pixDestroy(&pix);
  }
  imageItem = imageScene->addPixmap(QPixmap::fromImage(image));
  return true;
}
bool ChildWidget :: reloadImg ( ) { if ( DMESS > 10 ) qDebug ( ) << Q_FUNC_INFO ; imageScene -> removeItem ( static_cast < QGraphicsItem * > ( imageItem ) ) ; delete imageItem ; QImage image ; if ( pageWidget -> isHidden ( ) ) { image . load ( imageFile ) ; } else { PIX * pix ; pix = pixReadTiff ( imageFile . toLocal8Bit ( ) . data ( ) , currPage ) ; image = TessTools :: PIX2qImage ( pix ) ; pixDestroy ( & pix ) ; } imageItem = imageScene -> addPixmap ( QPixmap :: fromImage ( image ) ) ; return true ; }
@brief reload current image/page from image file
@brief reload current image / page from image file
// one page - QImage is ok // multipage - use leptonica