mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 03:30:20 +00:00
402c93e622
as it uses the yetToBeAnnounced freedesktop libspectre project. I'm actually adding libspectre sources for the kde4.0.x timeframe as libspectre won't be released/packaged on time for 4.0 but will remove it for 4.1 and onwards. libspectre is a shared project between okular and evince *hooraay* that aims to unify the developing of a layer on top of libgs That closes my work on making ps *work* on okular for KDE 4.0, any reported problem will be of course investigated Thanks for reading up to here :-D svn path=/trunk/KDE/kdegraphics/okular/; revision=732860
59 lines
1.6 KiB
C++
59 lines
1.6 KiB
C++
/***************************************************************************
|
|
* Copyright (C) 2007 by Albert Astals Cid <aacid@kde.org> *
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
***************************************************************************/
|
|
|
|
#ifndef _OKULAR_GSRENDERERTHREAD_H_
|
|
#define _OKULAR_GSRENDERERTHREAD_H_
|
|
|
|
#include <qsemaphore.h>
|
|
#include <qstring.h>
|
|
#include <qthread.h>
|
|
|
|
#include <libspectre/spectre.h>
|
|
|
|
class QImage;
|
|
|
|
namespace Okular
|
|
{
|
|
class PixmapRequest;
|
|
}
|
|
|
|
class GSRendererThread : public QThread
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
static GSRendererThread *getCreateRenderer();
|
|
|
|
~GSRendererThread();
|
|
|
|
void setPlatformFonts(bool pfonts);
|
|
void setAABits(int text, int graphics);
|
|
void setMagnify(double magnify);
|
|
void setRotation(int rotation);
|
|
|
|
void startRequest(Okular::PixmapRequest *request, SpectrePage *page);
|
|
|
|
signals:
|
|
void imageDone(QImage *image, Okular::PixmapRequest *request);
|
|
|
|
private:
|
|
GSRendererThread();
|
|
|
|
QSemaphore m_semaphore;
|
|
|
|
static GSRendererThread *theRenderer;
|
|
|
|
void run();
|
|
|
|
SpectreRenderContext *m_renderContext;
|
|
Okular::PixmapRequest *m_currentRequest, *m_nextRequest;
|
|
SpectrePage *m_currentPage, *m_nextPage;
|
|
};
|
|
|
|
#endif
|