SVN_SILENT made messages (.desktop file)
[kdegraphics.git] / okular / generators / tiff / generator_tiff.h
blob9ad1de613a0ca2a2e0fb10c04333ca622f51f6df
1 /***************************************************************************
2 * Copyright (C) 2006 by Pino Toscano <toscano.pino@tiscali.it> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #ifndef _OKULAR_GENERATOR_TIFF_H_
11 #define _OKULAR_GENERATOR_TIFF_H_
13 #include <core/generator.h>
15 #include <qhash.h>
17 class TIFFGenerator : public Okular::Generator
19 Q_OBJECT
20 public:
21 TIFFGenerator( QObject *parent, const QVariantList &args );
22 virtual ~TIFFGenerator();
24 bool loadDocument( const QString & fileName, QVector<Okular::Page*> & pagesVector );
25 bool loadDocumentFromData( const QByteArray & fileData, QVector< Okular::Page * > & pagesVector );
27 const Okular::DocumentInfo * generateDocumentInfo();
29 bool print( QPrinter& printer );
31 protected:
32 bool doCloseDocument();
33 QImage image( Okular::PixmapRequest * request );
35 private:
36 class Private;
37 Private * const d;
39 bool loadTiff( QVector< Okular::Page * > & pagesVector, const char *name );
40 void loadPages( QVector<Okular::Page*> & pagesVector );
41 int mapPage( int page ) const;
43 Okular::DocumentInfo * m_docInfo;
44 QHash< int, int > m_pageMapping;
47 #endif