Corregido bug relativo a bookmarks y los c?mics en pdf o carpetas

Cambiado de uso de QPixmap por QImage en las partes que estan fuera de GUI

Cambiadas las llamadas a enableAction para asegurar que se producen siempre antes
que disableAction en caso de error al abrir.

Corregida la gesti?n de errores de apertura al usar FactoryComic
This commit is contained in:
Luis Ángel San Martín
2013-01-20 15:28:34 +01:00
parent 726061affe
commit ae4913b685
13 changed files with 110 additions and 55 deletions

View File

@ -137,13 +137,16 @@ void Viewer::createConnections()
//render
connect(render,SIGNAL(errorOpening()),this,SLOT(resetContent()));
connect(render,SIGNAL(errorOpening()),this,SLOT(showMessageErrorOpening()));
connect(render,SIGNAL(numPages(unsigned int)),goToFlow,SLOT(setNumSlides(unsigned int)));
connect(render,SIGNAL(numPages(unsigned int)),goToDialog,SLOT(setNumPages(unsigned int)));
connect(render,SIGNAL(imageLoaded(int,QByteArray)),goToFlow,SLOT(setImageReady(int,QByteArray)));
connect(render,SIGNAL(currentPageReady()),this,SLOT(updatePage()));
connect(render,SIGNAL(processingPage()),this,SLOT(setLoadingMessage()));
connect(render,SIGNAL(currentPageIsBookmark(bool)),this,SIGNAL(pageIsBookmark(bool)));
connect(render,SIGNAL(bookmarksLoaded(const Bookmarks &)),bd,SLOT(setBookmarks(const Bookmarks &)));
//connect(render,SIGNAL(bookmarksLoaded(Bookmarks)),this,SLOT(setBookmarks(Bookmarks)));
connect(render,SIGNAL(bookmarksUpdated()),this,SLOT(setBookmarks()));
}
void Viewer::open(QString pathFile)
@ -159,6 +162,11 @@ void Viewer::open(QString pathFile)
verticalScrollBar()->setSliderPosition(verticalScrollBar()->minimum());
}
void Viewer::showMessageErrorOpening()
{
QMessageBox::critical(NULL,tr("Not found"),tr("Comic not found"));
}
void Viewer::next()
{
direction = 1;
@ -723,4 +731,9 @@ void Viewer::updateFitToWidthRatio(float ratio)
void Viewer::updateConfig(QSettings * settings)
{
goToFlow->updateConfig(settings);
}
void Viewer::setBookmarks()
{
bd->setBookmarks(*render->getBookmarks());
}