- add relevant signals (xpdf)

- port to new api (kimgio)

svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445384
remotes/origin/okular3-playground
Piotr Szymanski 21 years ago
parent 83a91ddbe9
commit ac523a75a5
  1. 2
      generators/kimgio/Makefile.am
  2. 4
      generators/kimgio/generator_kimgio.cpp
  3. 11
      generators/kimgio/generator_kimgio.h
  4. 5
      generators/kimgio/libokularGenerator_kimgio.desktop
  5. 2
      generators/xpdf/Makefile.am
  6. 2
      generators/xpdf/generator_pdf.cpp
  7. 5
      generators/xpdf/generator_pdf.h

@ -7,4 +7,6 @@ libokularGenerator_kimgio_la_LIBADD = $(top_builddir)/kpdf/core/libkpdfcore.la $
libokularGenerator_kimgio_la_LDFLAGS = -module -avoid-version $(KDE_PLUGIN) $(all_libraries)
libokularGenerator_kimgio_la_SOURCES = generator_kimgio.cpp
METASOURCES = AUTO
kde_services_DATA = libokularGenerator_kimgio.desktop

@ -38,7 +38,7 @@ bool KIMGIOGenerator::loadDocument( const QString & fileName, QValueVector<KPDFP
return true;
}
bool KIMGIOGenerator::canGeneratePixmap()
bool KIMGIOGenerator::canGeneratePixmap( bool /* async */ )
{
return true;
}
@ -67,3 +67,5 @@ bool KIMGIOGenerator::print( KPrinter& printer )
return true;
}
#include "generator_kimgio.moc"

@ -14,6 +14,7 @@
class KIMGIOGenerator : public Generator
{
Q_OBJECT
public:
KIMGIOGenerator( KPDFDocument * document );
virtual ~KIMGIOGenerator();
@ -22,10 +23,10 @@ class KIMGIOGenerator : public Generator
bool loadDocument( const QString & fileName, QValueVector<KPDFPage*> & pagesVector );
// [INHERITED] perform actions on document / pages
bool canGeneratePixmap();
bool canGeneratePixmap( bool async );
void generatePixmap( PixmapRequest * request );
void generateSyncTextPage( KPDFPage * page ) {;};
// [INHERITED] capability querying
// [INHERITED] capability querying
QString getXMLFile() { return QString::null; };
void setupGUI(KActionCollection * /*ac*/ , QToolBox * /* tBox */) { ; };
bool hasFonts() const;
@ -39,10 +40,14 @@ class KIMGIOGenerator : public Generator
QString * getText(const RegularAreaRect*, KPDFPage*) { return 0; };
// font related
// [INHERITED] print document using already configured kprinter
bool print( KPrinter& printer );
signals:
void error(QString & string, int duration);
void warning(QString & string, int duration);
void notice(QString & string, int duration);
private:
QPixmap *m_pix;
};

@ -1,10 +1,11 @@
[Desktop Entry]
Encoding=UTF-8
Type=Service
Name=Kimgio Generator
Name=KDE Image libraries
Comment=Image backend for oKular
ServiceTypes=oKular/Generator
MimeType=image/x-bmp;image/x-dds;image/x-eps;image/x-exr;image/gif;image/x-hdr;image/x-ico;image/jp2;image/jpeg;video/x-mng;image/x-portable-bitmap;image/x-pcx;image/x-portable-greymap;image/png;image/x-portable-pixmap;image/x-psd;image/x-rgb;image/x-targa;image/tiff;image/x-xbm;image/x-xcf-gimp;image/x-xpm;
X-KDE-Library=libokularGenerator_kimgio.la
X-KDE-Priority=1
X-KDE-oKularAPIVersion=5
X-KDE-oKularAPIVersion=1
X-KDE-oKularHasInternalSettings=false

@ -13,6 +13,8 @@ libokularGenerator_xpdf_la_SOURCES = generator_pdf.cpp gp_outputdev.cpp
KDE_OPTIONS = nofinal
METASOURCES = AUTO
kde_services_DATA = libokularGenerator_xpdf.desktop
generator_pdf.lo: ../../conf/settings.h

@ -2272,3 +2272,5 @@ void PDFPixmapGeneratorThread::run()
readyEvent->setData( d->currentRequest );
QApplication::postEvent( d->generator, readyEvent );
}
#include "generator_pdf.moc"

@ -47,6 +47,7 @@ class PDFPixmapGeneratorThread;
*/
class PDFGenerator : public Generator
{
Q_OBJECT
public:
PDFGenerator( KPDFDocument * document );
virtual ~PDFGenerator();
@ -91,6 +92,10 @@ class PDFGenerator : public Generator
// [INHERITED] reparse configuration
bool reparseConfig();
signals:
void error(QString & string, int duration);
void warning(QString & string, int duration);
void notice(QString & string, int duration);
private:
// friend class to access private document related variables

Loading…
Cancel
Save