mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 21:14:33 -04:00
some destructors added
This commit is contained in:
@ -27,7 +27,7 @@ Comic::Comic(const QString & pathFile, int atPage )
|
||||
//-----------------------------------------------------------------------------
|
||||
Comic::~Comic()
|
||||
{
|
||||
delete bm; //TODO safe delete
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void Comic::setup()
|
||||
@ -188,7 +188,7 @@ FileComic::FileComic(const QString & path, int atPage )
|
||||
|
||||
FileComic::~FileComic()
|
||||
{
|
||||
//Comic::~Comic();
|
||||
_pages.clear();
|
||||
}
|
||||
|
||||
bool FileComic::load(const QString & path, int atPage)
|
||||
|
@ -29,7 +29,7 @@
|
||||
/*#define WIDTH 126
|
||||
#define HEIGHT 200*/
|
||||
|
||||
QMutex mutexGoToFlow;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ GoToFlow::GoToFlow(QWidget *parent,FlowType flowType)
|
||||
updateTimer = new QTimer;
|
||||
connect(updateTimer, SIGNAL(timeout()), this, SLOT(updateImageData()));
|
||||
|
||||
worker = new PageLoader;
|
||||
worker = new PageLoader(&mutexGoToFlow);
|
||||
|
||||
|
||||
flow = new YACReaderFlow(this,flowType);
|
||||
@ -70,7 +70,12 @@ GoToFlow::GoToFlow(QWidget *parent,FlowType flowType)
|
||||
|
||||
|
||||
}
|
||||
|
||||
GoToFlow::~GoToFlow()
|
||||
{
|
||||
delete flow;
|
||||
delete updateTimer;
|
||||
worker->deleteLater();
|
||||
}
|
||||
|
||||
void GoToFlow::centerSlide(int slide)
|
||||
{
|
||||
@ -97,7 +102,7 @@ void GoToFlow::setNumSlides(unsigned int slides)
|
||||
|
||||
toolBar->setTop(slides);
|
||||
|
||||
SlideInitializer * si = new SlideInitializer(flow,slides);
|
||||
SlideInitializer * si = new SlideInitializer(&mutexGoToFlow,flow,slides);
|
||||
|
||||
imagesLoaded.clear();
|
||||
imagesLoaded.fill(false,slides);
|
||||
@ -235,37 +240,37 @@ void GoToFlow::updateConfig(QSettings * settings)
|
||||
//-----------------------------------------------------------------------------
|
||||
//SlideInitializer
|
||||
//-----------------------------------------------------------------------------
|
||||
SlideInitializer::SlideInitializer(PictureFlow * flow,int slides)
|
||||
:QThread(),_flow(flow),_slides(slides)
|
||||
SlideInitializer::SlideInitializer(QMutex * m,PictureFlow * flow,int slides)
|
||||
:QThread(),mutex(m),_flow(flow),_slides(slides)
|
||||
{
|
||||
|
||||
}
|
||||
void SlideInitializer::run()
|
||||
{
|
||||
mutexGoToFlow.lock();
|
||||
mutex->lock();
|
||||
|
||||
_flow->clear();
|
||||
for(int i=0;i<_slides;i++)
|
||||
_flow->addSlide(QImage());
|
||||
_flow->setCenterIndex(0);
|
||||
|
||||
mutexGoToFlow.unlock();
|
||||
mutex->unlock();
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
//PageLoader
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
PageLoader::PageLoader():
|
||||
QThread(), restart(false), working(false), idx(-1)
|
||||
PageLoader::PageLoader(QMutex * m):
|
||||
QThread(),mutex(m), restart(false), working(false), idx(-1)
|
||||
{
|
||||
}
|
||||
|
||||
PageLoader::~PageLoader()
|
||||
{
|
||||
mutexGoToFlow.lock();
|
||||
mutex->lock();
|
||||
condition.wakeOne();
|
||||
mutexGoToFlow.unlock();
|
||||
mutex->unlock();
|
||||
wait();
|
||||
}
|
||||
|
||||
@ -276,12 +281,12 @@ bool PageLoader::busy() const
|
||||
|
||||
void PageLoader::generate(int index, QSize size,const QByteArray & rImage)
|
||||
{
|
||||
mutexGoToFlow.lock();
|
||||
mutex->lock();
|
||||
this->idx = index;
|
||||
//this->img = QImage();
|
||||
this->size = size;
|
||||
this->rawImage = rImage;
|
||||
mutexGoToFlow.unlock();
|
||||
mutex->unlock();
|
||||
|
||||
if (!isRunning())
|
||||
start();
|
||||
@ -298,7 +303,7 @@ void PageLoader::run()
|
||||
for(;;)
|
||||
{
|
||||
// copy necessary data
|
||||
mutexGoToFlow.lock();
|
||||
mutex->lock();
|
||||
this->working = true;
|
||||
//int idx = this->idx;
|
||||
|
||||
@ -308,18 +313,18 @@ void PageLoader::run()
|
||||
// let everyone knows it is ready
|
||||
image = image.scaled(this->size,Qt::KeepAspectRatio,Qt::SmoothTransformation);
|
||||
|
||||
mutexGoToFlow.unlock();
|
||||
mutex->unlock();
|
||||
|
||||
mutexGoToFlow.lock();
|
||||
mutex->lock();
|
||||
this->working = false;
|
||||
this->img = image;
|
||||
mutexGoToFlow.unlock();
|
||||
mutex->unlock();
|
||||
|
||||
// put to sleep
|
||||
mutexGoToFlow.lock();
|
||||
mutex->lock();
|
||||
if (!this->restart)
|
||||
condition.wait(&mutexGoToFlow);
|
||||
condition.wait(mutex);
|
||||
restart = false;
|
||||
mutexGoToFlow.unlock();
|
||||
mutex->unlock();
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <QThread>
|
||||
|
||||
#include <QWaitCondition>
|
||||
#include <QMutex>
|
||||
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
@ -28,6 +29,7 @@ class GoToFlow : public GoToFlowWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
GoToFlow(QWidget* parent = 0,FlowType flowType = CoverFlowLike);
|
||||
~GoToFlow();
|
||||
bool ready; //comic is ready for read.
|
||||
bool eventFilter(QObject *target, QEvent *event);
|
||||
private:
|
||||
@ -43,6 +45,7 @@ private:
|
||||
QTimer* updateTimer;
|
||||
PageLoader* worker;
|
||||
virtual void wheelEvent(QWheelEvent * event);
|
||||
QMutex mutexGoToFlow;
|
||||
|
||||
private slots:
|
||||
void preload();
|
||||
@ -59,7 +62,6 @@ private:
|
||||
signals:
|
||||
void goToPage(unsigned int page);
|
||||
|
||||
|
||||
};
|
||||
//-----------------------------------------------------------------------------
|
||||
//SlideInitializer
|
||||
@ -67,8 +69,9 @@ signals:
|
||||
class SlideInitializer : public QThread
|
||||
{
|
||||
public:
|
||||
SlideInitializer(PictureFlow * flow,int slides);
|
||||
SlideInitializer(QMutex * m,PictureFlow * flow,int slides);
|
||||
private:
|
||||
QMutex * mutex;
|
||||
PictureFlow * _flow;
|
||||
int _slides;
|
||||
void run();
|
||||
@ -80,7 +83,7 @@ private:
|
||||
class PageLoader : public QThread
|
||||
{
|
||||
public:
|
||||
PageLoader();
|
||||
PageLoader(QMutex * m);
|
||||
~PageLoader();
|
||||
// returns FALSE if worker is still busy and can't take the task
|
||||
bool busy() const;
|
||||
@ -91,6 +94,7 @@ public:
|
||||
protected:
|
||||
void run();
|
||||
private:
|
||||
QMutex * mutex;
|
||||
QWaitCondition condition;
|
||||
|
||||
bool restart;
|
||||
|
@ -41,6 +41,11 @@ GoToFlowGL::GoToFlowGL(QWidget* parent, FlowType flowType)
|
||||
this->setCursor(QCursor(Qt::ArrowCursor));
|
||||
}
|
||||
|
||||
GoToFlowGL::~GoToFlowGL()
|
||||
{
|
||||
delete flow;
|
||||
}
|
||||
|
||||
bool GoToFlowGL::eventFilter(QObject *target, QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::KeyPress)
|
||||
|
@ -16,6 +16,7 @@ class GoToFlowGL : public GoToFlowWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
GoToFlowGL(QWidget* parent = 0,FlowType flowType = CoverFlowLike);
|
||||
~GoToFlowGL();
|
||||
void reset();
|
||||
void centerSlide(int slide);
|
||||
void setFlowType(FlowType flowType);
|
||||
|
@ -28,6 +28,12 @@ GoToFlowWidget::GoToFlowWidget(QWidget * parent)
|
||||
setLayout(mainLayout);
|
||||
}
|
||||
|
||||
GoToFlowWidget::~GoToFlowWidget() {
|
||||
delete topBar;
|
||||
delete toolBar;
|
||||
delete mainLayout;
|
||||
}
|
||||
|
||||
void GoToFlowWidget::setPageNumber(int page)
|
||||
{
|
||||
toolBar->setPage(page);
|
||||
|
@ -19,6 +19,7 @@ protected:
|
||||
GoToFlowToolBar * toolBar;
|
||||
public:
|
||||
GoToFlowWidget(QWidget * paret = 0);
|
||||
virtual ~GoToFlowWidget() = 0;
|
||||
public slots:
|
||||
virtual void reset() = 0;
|
||||
virtual void centerSlide(int slide) = 0;
|
||||
|
@ -60,6 +60,40 @@ MainWindowViewer::MainWindowViewer()
|
||||
setupUI();
|
||||
}
|
||||
|
||||
MainWindowViewer::~MainWindowViewer()
|
||||
{
|
||||
delete settings;
|
||||
delete viewer;
|
||||
delete had;
|
||||
|
||||
delete sliderAction;
|
||||
delete openAction;
|
||||
delete openFolderAction;
|
||||
delete saveImageAction;
|
||||
delete openPreviousComicAction;
|
||||
delete openNextComicAction;
|
||||
delete prevAction;
|
||||
delete nextAction;
|
||||
delete adjustHeight;
|
||||
delete adjustWidth;
|
||||
delete leftRotationAction;
|
||||
delete rightRotationAction;
|
||||
delete doublePageAction;
|
||||
delete goToPage;
|
||||
delete optionsAction;
|
||||
delete helpAboutAction;
|
||||
delete showMagnifyingGlass;
|
||||
delete setBookmark;
|
||||
delete showBookmarks;
|
||||
delete showShorcutsAction;
|
||||
delete showInfo;
|
||||
delete closeAction;
|
||||
delete showDictionaryAction;
|
||||
delete alwaysOnTopAction;
|
||||
delete adjustToFullSizeAction;
|
||||
delete showFlowAction;
|
||||
|
||||
}
|
||||
void MainWindowViewer::loadConfiguration()
|
||||
{
|
||||
settings = new QSettings(QCoreApplication::applicationDirPath()+"/YACReader.ini",QSettings::IniFormat);
|
||||
@ -823,7 +857,7 @@ void MainWindowViewer::closeEvent ( QCloseEvent * event )
|
||||
conf.setSize(size());
|
||||
}
|
||||
conf.setMaximized(isMaximized());
|
||||
|
||||
|
||||
emit (closed());
|
||||
}
|
||||
|
||||
|
@ -127,6 +127,7 @@ signals:
|
||||
virtual void closeEvent ( QCloseEvent * event );
|
||||
public:
|
||||
MainWindowViewer();
|
||||
~MainWindowViewer();
|
||||
|
||||
};
|
||||
#endif
|
||||
|
@ -130,7 +130,7 @@ QImage changeGamma( const QImage& image, int gamma )
|
||||
return changeImage< changeGamma >( image, gamma );
|
||||
}
|
||||
|
||||
QMutex mutex;
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// MeanNoiseReductionFilter
|
||||
@ -336,8 +336,9 @@ PageRender::PageRender()
|
||||
{
|
||||
|
||||
}
|
||||
PageRender::PageRender(int np, const QByteArray & rd, QImage * p,unsigned int d, QVector<ImageFilter *> f)
|
||||
PageRender::PageRender(Render * r,int np, const QByteArray & rd, QImage * p,unsigned int d, QVector<ImageFilter *> f)
|
||||
:QThread(),
|
||||
render(r),
|
||||
numPage(np),
|
||||
data(rd),
|
||||
page(p),
|
||||
@ -348,7 +349,7 @@ filters(f)
|
||||
|
||||
void PageRender::run()
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
QMutexLocker locker(&(render->mutex));
|
||||
|
||||
QImage img;
|
||||
img.loadFromData(data);
|
||||
@ -373,8 +374,9 @@ void PageRender::run()
|
||||
// DoublePageRender
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
DoublePageRender::DoublePageRender(int np, const QByteArray & rd, const QByteArray & rd2, QImage * p,unsigned int d, QVector<ImageFilter *> f)
|
||||
DoublePageRender::DoublePageRender(Render * r, int np, const QByteArray & rd, const QByteArray & rd2, QImage * p,unsigned int d, QVector<ImageFilter *> f)
|
||||
:PageRender(),
|
||||
render(r),
|
||||
numPage(np),
|
||||
data(rd),
|
||||
data2(rd2),
|
||||
@ -388,7 +390,7 @@ filters(f)
|
||||
void DoublePageRender::run()
|
||||
{
|
||||
//QImage result;
|
||||
QMutexLocker locker(&mutex);
|
||||
QMutexLocker locker(&(render->mutex));
|
||||
QImage img, img2;
|
||||
if(!data.isEmpty())
|
||||
img.loadFromData(data);
|
||||
@ -470,6 +472,24 @@ Render::Render()
|
||||
filters.push_back(new GammaFilter());
|
||||
}
|
||||
|
||||
Render::~Render()
|
||||
{
|
||||
if(comic!=0)
|
||||
{
|
||||
comic->moveToThread(QApplication::instance()->thread());
|
||||
comic->deleteLater();
|
||||
}
|
||||
|
||||
foreach(ImageFilter * filter, filters)
|
||||
delete filter;
|
||||
|
||||
foreach(PageRender * pr,pageRenders)
|
||||
if(pr !=0)
|
||||
{
|
||||
if(pr->wait())
|
||||
delete pr;
|
||||
}
|
||||
}
|
||||
//Este m<>todo se encarga de forzar el renderizado de las p<>ginas.
|
||||
//Actualiza el buffer seg<65>n es necesario.
|
||||
//si la pagina actual no est<73> renderizada, se lanza un hilo que la renderize (double or single page mode) y se emite una se<73>al que indica que se est<73> renderizando.
|
||||
@ -484,16 +504,16 @@ void Render::render()
|
||||
{
|
||||
if(pagesReady[currentIndex] && pagesReady[qMin(currentIndex+1,(int)comic->numPages()-1)])
|
||||
if(currentIndex+1 > comic->numPages()-1)
|
||||
pageRenders[currentPageBufferedIndex] = new DoublePageRender(currentIndex,comic->getRawData()->at(currentIndex),QByteArray(),buffer[currentPageBufferedIndex],imageRotation,filters);
|
||||
pageRenders[currentPageBufferedIndex] = new DoublePageRender(this,currentIndex,comic->getRawData()->at(currentIndex),QByteArray(),buffer[currentPageBufferedIndex],imageRotation,filters);
|
||||
else
|
||||
pageRenders[currentPageBufferedIndex] = new DoublePageRender(currentIndex,comic->getRawData()->at(currentIndex),comic->getRawData()->at(currentIndex+1),buffer[currentPageBufferedIndex],imageRotation,filters);
|
||||
pageRenders[currentPageBufferedIndex] = new DoublePageRender(this,currentIndex,comic->getRawData()->at(currentIndex),comic->getRawData()->at(currentIndex+1),buffer[currentPageBufferedIndex],imageRotation,filters);
|
||||
else
|
||||
//las p<>ginas no est<73>n listas, y se est<73>n cargando en el c<>mic
|
||||
emit processingPage(); //para evitar confusiones esta se<73>al deber<65>a llamarse de otra forma
|
||||
}
|
||||
else
|
||||
if(pagesReady[currentIndex])
|
||||
pageRenders[currentPageBufferedIndex] = new PageRender(currentIndex,comic->getRawData()->at(currentIndex),buffer[currentPageBufferedIndex],imageRotation,filters);
|
||||
pageRenders[currentPageBufferedIndex] = new PageRender(this,currentIndex,comic->getRawData()->at(currentIndex),buffer[currentPageBufferedIndex],imageRotation,filters);
|
||||
else
|
||||
//las p<>ginas no est<73>n listas, y se est<73>n cargando en el c<>mic
|
||||
emit processingPage(); //para evitar confusiones esta se<73>al deber<65>a llamarse de otra forma
|
||||
@ -862,7 +882,7 @@ void Render::fillBuffer()
|
||||
pageRenders[currentPageBufferedIndex+i]==0 &&
|
||||
pagesReady[currentIndex+1]) //preload next pages
|
||||
{
|
||||
pageRenders[currentPageBufferedIndex+i] = new PageRender(currentIndex+i,comic->getRawData()->at(currentIndex+i),buffer[currentPageBufferedIndex+i],imageRotation,filters);
|
||||
pageRenders[currentPageBufferedIndex+i] = new PageRender(this,currentIndex+i,comic->getRawData()->at(currentIndex+i),buffer[currentPageBufferedIndex+i],imageRotation,filters);
|
||||
connect(pageRenders[currentPageBufferedIndex],SIGNAL(pageReady(int)),this,SLOT(prepareAvailablePage(int)));
|
||||
pageRenders[currentPageBufferedIndex+i]->start();
|
||||
}
|
||||
@ -873,7 +893,7 @@ void Render::fillBuffer()
|
||||
pageRenders[currentPageBufferedIndex-i]==0 &&
|
||||
pagesReady[currentIndex-1]) //preload previous pages
|
||||
{
|
||||
pageRenders[currentPageBufferedIndex-i] = new PageRender(currentIndex-i,comic->getRawData()->at(currentIndex-i),buffer[currentPageBufferedIndex-i],imageRotation,filters);
|
||||
pageRenders[currentPageBufferedIndex-i] = new PageRender(this,currentIndex-i,comic->getRawData()->at(currentIndex-i),buffer[currentPageBufferedIndex-i],imageRotation,filters);
|
||||
connect(pageRenders[currentPageBufferedIndex],SIGNAL(pageReady(int)),this,SLOT(prepareAvailablePage(int)));
|
||||
pageRenders[currentPageBufferedIndex-i]->start();
|
||||
}
|
||||
@ -891,9 +911,9 @@ void Render::fillBufferDoublePage()
|
||||
(pagesReady[currentIndex+2*i] && pagesReady[qMin(currentIndex+(2*i)+1,(int)comic->numPages()-1)])) //preload next pages
|
||||
{
|
||||
if(currentIndex+(2*i)+1 > comic->numPages()-1)
|
||||
pageRenders[currentPageBufferedIndex+i] = new DoublePageRender(currentIndex+2*i,comic->getRawData()->at(currentIndex+(2*i)),QByteArray(),buffer[currentPageBufferedIndex+i],imageRotation,filters);
|
||||
pageRenders[currentPageBufferedIndex+i] = new DoublePageRender(this,currentIndex+2*i,comic->getRawData()->at(currentIndex+(2*i)),QByteArray(),buffer[currentPageBufferedIndex+i],imageRotation,filters);
|
||||
else
|
||||
pageRenders[currentPageBufferedIndex+i] = new DoublePageRender(currentIndex+2*i,comic->getRawData()->at(currentIndex+(2*i)),comic->getRawData()->at(currentIndex+(2*i)+1),buffer[currentPageBufferedIndex+i],imageRotation,filters);
|
||||
pageRenders[currentPageBufferedIndex+i] = new DoublePageRender(this,currentIndex+2*i,comic->getRawData()->at(currentIndex+(2*i)),comic->getRawData()->at(currentIndex+(2*i)+1),buffer[currentPageBufferedIndex+i],imageRotation,filters);
|
||||
connect(pageRenders[currentPageBufferedIndex],SIGNAL(pageReady(int)),this,SLOT(prepareAvailablePage(int)));
|
||||
pageRenders[currentPageBufferedIndex+i]->start();
|
||||
}
|
||||
@ -905,9 +925,9 @@ void Render::fillBufferDoublePage()
|
||||
(pagesReady[qMax(currentIndex-2*i,0)] && pagesReady[qMin(currentIndex-(2*i)+1,(int)comic->numPages()-1)])) //preload previous pages
|
||||
{
|
||||
if(currentIndex-2*i == -1)
|
||||
pageRenders[currentPageBufferedIndex-i] = new DoublePageRender(0,QByteArray(),comic->getRawData()->at(0),buffer[currentPageBufferedIndex-i],imageRotation,filters);
|
||||
pageRenders[currentPageBufferedIndex-i] = new DoublePageRender(this,0,QByteArray(),comic->getRawData()->at(0),buffer[currentPageBufferedIndex-i],imageRotation,filters);
|
||||
else
|
||||
pageRenders[currentPageBufferedIndex-i] = new DoublePageRender(currentIndex-2*i,comic->getRawData()->at(currentIndex-(2*i)),comic->getRawData()->at(currentIndex-(2*i)+1),buffer[currentPageBufferedIndex-i],imageRotation,filters);
|
||||
pageRenders[currentPageBufferedIndex-i] = new DoublePageRender(this,currentIndex-2*i,comic->getRawData()->at(currentIndex-(2*i)),comic->getRawData()->at(currentIndex-(2*i)+1),buffer[currentPageBufferedIndex-i],imageRotation,filters);
|
||||
connect(pageRenders[currentPageBufferedIndex],SIGNAL(pageReady(int)),this,SLOT(prepareAvailablePage(int)));
|
||||
pageRenders[currentPageBufferedIndex-i]->start();
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <QThread>
|
||||
|
||||
class Comic;
|
||||
class Render;
|
||||
|
||||
class ImageFilter {
|
||||
public:
|
||||
@ -73,7 +74,7 @@ class PageRender : public QThread
|
||||
Q_OBJECT
|
||||
public:
|
||||
PageRender();
|
||||
PageRender(int numPage, const QByteArray & rawData, QImage * page,unsigned int degrees=0, QVector<ImageFilter *> filters = QVector<ImageFilter *>());
|
||||
PageRender(Render * render,int numPage, const QByteArray & rawData, QImage * page,unsigned int degrees=0, QVector<ImageFilter *> filters = QVector<ImageFilter *>());
|
||||
int getNumPage(){return numPage;};
|
||||
void setData(const QByteArray & rawData){data = rawData;};
|
||||
void setPage(QImage * p){page = p;};
|
||||
@ -86,6 +87,7 @@ private:
|
||||
unsigned int degrees;
|
||||
QVector<ImageFilter *> filters;
|
||||
void run();
|
||||
Render * render;
|
||||
signals:
|
||||
void pageReady(int);
|
||||
|
||||
@ -98,7 +100,7 @@ class DoublePageRender : public PageRender
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DoublePageRender(int firstPage, const QByteArray & firstPageData,const QByteArray & secondPageData, QImage * page,unsigned int degrees=0, QVector<ImageFilter *> filters = QVector<ImageFilter *>());
|
||||
DoublePageRender(Render * render, int firstPage, const QByteArray & firstPageData,const QByteArray & secondPageData, QImage * page,unsigned int degrees=0, QVector<ImageFilter *> filters = QVector<ImageFilter *>());
|
||||
private:
|
||||
int numPage;
|
||||
QByteArray data;
|
||||
@ -107,6 +109,7 @@ private:
|
||||
unsigned int degrees;
|
||||
QVector<ImageFilter *> filters;
|
||||
void run();
|
||||
Render * render;
|
||||
signals:
|
||||
void pageReady(int);
|
||||
|
||||
@ -117,6 +120,7 @@ class Render : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
Render();
|
||||
~Render();
|
||||
|
||||
public slots:
|
||||
void render();
|
||||
@ -187,6 +191,10 @@ private:
|
||||
QVector<bool> pagesReady;
|
||||
int imageRotation;
|
||||
QVector<ImageFilter *> filters;
|
||||
QMutex mutex;
|
||||
|
||||
friend class PageRender;
|
||||
friend class DoublePageRender;
|
||||
|
||||
};
|
||||
|
||||
|
@ -115,6 +115,23 @@ drag(false)
|
||||
|
||||
}
|
||||
|
||||
Viewer::~Viewer()
|
||||
{
|
||||
delete render;
|
||||
delete goToFlow;
|
||||
delete translator;
|
||||
delete translatorAnimation;
|
||||
delete content;
|
||||
delete hideCursorTimer;
|
||||
delete informationLabel;
|
||||
delete verticalScroller;
|
||||
delete bd;
|
||||
delete notificationsLabel;
|
||||
delete mglass;
|
||||
if(currentPage != 0)
|
||||
delete currentPage;
|
||||
}
|
||||
|
||||
void Viewer::createConnections()
|
||||
{
|
||||
//magnifyingGlass (update mg after a background change
|
||||
|
@ -132,6 +132,7 @@ virtual void mouseReleaseEvent ( QMouseEvent * event );
|
||||
|
||||
public:
|
||||
Viewer(QWidget * parent = 0);
|
||||
~Viewer();
|
||||
void toggleFullScreen();
|
||||
const QPixmap * pixmap();
|
||||
//Comic * getComic(){return comic;}
|
||||
|
@ -1131,6 +1131,14 @@ YACReaderPageFlowGL::YACReaderPageFlowGL(QWidget *parent,struct Preset p )
|
||||
worker->flow = this;
|
||||
}
|
||||
|
||||
YACReaderPageFlowGL::~YACReaderPageFlowGL()
|
||||
{
|
||||
this->killTimer(timerId);
|
||||
//worker->deleteLater();
|
||||
rawImages.clear();
|
||||
free(cfImages);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -170,7 +170,7 @@ public:
|
||||
|
||||
/*Constructor*/
|
||||
YACReaderFlowGL(QWidget *parent = 0,struct Preset p = pressetYACReaderFlowDownConfig);
|
||||
~YACReaderFlowGL();
|
||||
virtual ~YACReaderFlowGL();
|
||||
|
||||
//size;
|
||||
QSize minimumSizeHint() const;
|
||||
@ -301,6 +301,7 @@ class YACReaderPageFlowGL : public YACReaderFlowGL
|
||||
{
|
||||
public:
|
||||
YACReaderPageFlowGL(QWidget *parent = 0,struct Preset p = defaultYACReaderFlowConfig);
|
||||
~YACReaderPageFlowGL();
|
||||
void updateImageData();
|
||||
void populate(int n);
|
||||
QVector<bool> imagesReady;
|
||||
|
@ -34,6 +34,13 @@ HelpAboutDialog::HelpAboutDialog(QWidget * parent)
|
||||
resize(500, QApplication::desktop()->availableGeometry().height()*0.83);
|
||||
}
|
||||
|
||||
HelpAboutDialog::~HelpAboutDialog()
|
||||
{
|
||||
delete aboutText;
|
||||
delete helpText;
|
||||
delete tabWidget;
|
||||
}
|
||||
|
||||
HelpAboutDialog::HelpAboutDialog(const QString & pathAbout,const QString & pathHelp,QWidget * parent)
|
||||
:QDialog(parent)
|
||||
{
|
||||
|
@ -12,6 +12,7 @@ Q_OBJECT
|
||||
public:
|
||||
HelpAboutDialog(QWidget * parent=0);
|
||||
HelpAboutDialog(const QString & pathAbout,const QString & pathHelp,QWidget * parent =0);
|
||||
~HelpAboutDialog();
|
||||
public slots:
|
||||
void loadAboutInformation(const QString & path);
|
||||
void loadHelp(const QString & path);
|
||||
|
Reference in New Issue
Block a user