mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
removed completely the lag from information label
comics are now opened by the last read page
This commit is contained in:
parent
a3837c0982
commit
0398b8ca57
@ -393,8 +393,9 @@ void FileComic::process()
|
|||||||
|
|
||||||
out << "tiempo en ordenar : " << myTimer.elapsed() << endl;
|
out << "tiempo en ordenar : " << myTimer.elapsed() << endl;
|
||||||
|
|
||||||
_firstPage = 0;
|
_firstPage = bm->getLastPage();
|
||||||
_index = 0;
|
_index = bm->getLastPage();
|
||||||
|
emit(openAt(_index));
|
||||||
|
|
||||||
int sectionIndex;
|
int sectionIndex;
|
||||||
QList<QVector <quint32> > sections = getSections(sectionIndex);
|
QList<QVector <quint32> > sections = getSections(sectionIndex);
|
||||||
|
@ -72,6 +72,7 @@
|
|||||||
void imageLoaded(int index);
|
void imageLoaded(int index);
|
||||||
void imageLoaded(int index,const QByteArray & image);
|
void imageLoaded(int index,const QByteArray & image);
|
||||||
void pageChanged(int index);
|
void pageChanged(int index);
|
||||||
|
void openAt(int index);
|
||||||
void numPages(unsigned int numPages);
|
void numPages(unsigned int numPages);
|
||||||
void errorOpening();
|
void errorOpening();
|
||||||
void isBookmark(bool);
|
void isBookmark(bool);
|
||||||
|
@ -589,7 +589,7 @@ void Render::load(const QString & path)
|
|||||||
connect(comic,SIGNAL(errorOpening()),this,SLOT(reset()));
|
connect(comic,SIGNAL(errorOpening()),this,SLOT(reset()));
|
||||||
connect(comic,SIGNAL(imageLoaded(int)),this,SIGNAL(imageLoaded(int)));
|
connect(comic,SIGNAL(imageLoaded(int)),this,SIGNAL(imageLoaded(int)));
|
||||||
connect(comic,SIGNAL(imageLoaded(int)),this,SLOT(pageRawDataReady(int)));
|
connect(comic,SIGNAL(imageLoaded(int)),this,SLOT(pageRawDataReady(int)));
|
||||||
//connect(comic,SIGNAL(pageChanged(int)),this,SIGNAL(pageChanged(int)));
|
connect(comic,SIGNAL(openAt(int)),this,SLOT(renderAt(int)));
|
||||||
connect(comic,SIGNAL(numPages(unsigned int)),this,SIGNAL(numPages(unsigned int)));
|
connect(comic,SIGNAL(numPages(unsigned int)),this,SIGNAL(numPages(unsigned int)));
|
||||||
connect(comic,SIGNAL(numPages(unsigned int)),this,SLOT(setNumPages(unsigned int)));
|
connect(comic,SIGNAL(numPages(unsigned int)),this,SLOT(setNumPages(unsigned int)));
|
||||||
connect(comic,SIGNAL(imageLoaded(int,QByteArray)),this,SIGNAL(imageLoaded(int,QByteArray)));
|
connect(comic,SIGNAL(imageLoaded(int,QByteArray)),this,SIGNAL(imageLoaded(int,QByteArray)));
|
||||||
@ -624,6 +624,12 @@ void Render::load(const QString & path)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Render::renderAt(int page)
|
||||||
|
{
|
||||||
|
previousIndex = currentIndex = page;
|
||||||
|
emit pageChanged(page);
|
||||||
|
}
|
||||||
|
|
||||||
void Render::reset()
|
void Render::reset()
|
||||||
{
|
{
|
||||||
loadedComic = false;
|
loadedComic = false;
|
||||||
@ -655,6 +661,7 @@ void Render::nextPage()
|
|||||||
previousIndex = currentIndex;
|
previousIndex = currentIndex;
|
||||||
currentIndex = nextPage;
|
currentIndex = nextPage;
|
||||||
update();
|
update();
|
||||||
|
emit pageChanged(currentIndex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
emit isLast();
|
emit isLast();
|
||||||
@ -685,6 +692,7 @@ void Render::previousPage()
|
|||||||
previousIndex = currentIndex;
|
previousIndex = currentIndex;
|
||||||
currentIndex = previousPage;
|
currentIndex = previousPage;
|
||||||
update();
|
update();
|
||||||
|
emit pageChanged(currentIndex);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
emit isCover();
|
emit isCover();
|
||||||
@ -761,6 +769,7 @@ void Render::goTo(int index)
|
|||||||
invalidate();
|
invalidate();
|
||||||
|
|
||||||
update();
|
update();
|
||||||
|
emit pageChanged(currentIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,6 +149,8 @@ public slots:
|
|||||||
void reset();
|
void reset();
|
||||||
void reload();
|
void reload();
|
||||||
Bookmarks * getBookmarks();
|
Bookmarks * getBookmarks();
|
||||||
|
//sets the firt page to render
|
||||||
|
void renderAt(int page);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void currentPageReady();
|
void currentPageReady();
|
||||||
|
@ -140,11 +140,12 @@ void Viewer::createConnections()
|
|||||||
connect(render,SIGNAL(errorOpening()),this,SLOT(showMessageErrorOpening()));
|
connect(render,SIGNAL(errorOpening()),this,SLOT(showMessageErrorOpening()));
|
||||||
connect(render,SIGNAL(numPages(unsigned int)),goToFlow,SLOT(setNumSlides(unsigned int)));
|
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(numPages(unsigned int)),goToDialog,SLOT(setNumPages(unsigned int)));
|
||||||
connect(render,SIGNAL(numPages(unsigned int)),this,SLOT(updateInformation()));
|
//connect(render,SIGNAL(numPages(unsigned int)),this,SLOT(updateInformation()));
|
||||||
connect(render,SIGNAL(imageLoaded(int,QByteArray)),goToFlow,SLOT(setImageReady(int,QByteArray)));
|
connect(render,SIGNAL(imageLoaded(int,QByteArray)),goToFlow,SLOT(setImageReady(int,QByteArray)));
|
||||||
connect(render,SIGNAL(currentPageReady()),this,SLOT(updatePage()));
|
connect(render,SIGNAL(currentPageReady()),this,SLOT(updatePage()));
|
||||||
connect(render,SIGNAL(processingPage()),this,SLOT(setLoadingMessage()));
|
connect(render,SIGNAL(processingPage()),this,SLOT(setLoadingMessage()));
|
||||||
connect(render,SIGNAL(currentPageIsBookmark(bool)),this,SIGNAL(pageIsBookmark(bool)));
|
connect(render,SIGNAL(currentPageIsBookmark(bool)),this,SIGNAL(pageIsBookmark(bool)));
|
||||||
|
connect(render,SIGNAL(pageChanged(int)),this,SLOT(updateInformation()));
|
||||||
//connect(render,SIGNAL(bookmarksLoaded(Bookmarks)),this,SLOT(setBookmarks(Bookmarks)));
|
//connect(render,SIGNAL(bookmarksLoaded(Bookmarks)),this,SLOT(setBookmarks(Bookmarks)));
|
||||||
|
|
||||||
connect(render,SIGNAL(isLast()),this,SLOT(showIsLastMessage()));
|
connect(render,SIGNAL(isLast()),this,SLOT(showIsLastMessage()));
|
||||||
|
@ -101,6 +101,11 @@ CompressedArchive::CompressedArchive(const QString & filePath, QObject *parent)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CompressedArchive::~CompressedArchive()
|
||||||
|
{
|
||||||
|
//TODO
|
||||||
|
}
|
||||||
|
|
||||||
void CompressedArchive::loadFunctions()
|
void CompressedArchive::loadFunctions()
|
||||||
{
|
{
|
||||||
//LOAD library
|
//LOAD library
|
||||||
|
@ -31,6 +31,7 @@ class CompressedArchive : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit CompressedArchive(const QString & filePath, QObject *parent = 0);
|
explicit CompressedArchive(const QString & filePath, QObject *parent = 0);
|
||||||
|
~CompressedArchive();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user