SVN_SILENT made messages (.desktop file)
[kdegraphics.git] / okular / generators / dvi / generator_dvi.h
blob66bf1ead5e9b007522c97b06f6e5183f5634b827
1 /***************************************************************************
2 * Copyright (C) 2006 by Luigi Toscano <luigi.toscano@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 _DVI_GENERATOR_H_
11 #define _DVI_GENERATOR_H_
13 #include <okular/core/generator.h>
15 class dviRenderer;
16 class dviPageInfo;
17 class Anchor;
19 namespace Okular {
20 class DocumentViewport;
21 class ObjectRect;
24 class DviGenerator : public Okular::Generator
26 Q_OBJECT
27 public:
28 DviGenerator( QObject *parent, const QVariantList &args );
29 bool loadDocument( const QString & fileName, QVector< Okular::Page * > & pagesVector );
31 bool canGeneratePixmap() const;
32 void generatePixmap( Okular::PixmapRequest * request );
34 // document information
35 const Okular::DocumentInfo *generateDocumentInfo();
37 // table of contents
38 const Okular::DocumentSynopsis *generateDocumentSynopsis();
40 bool print( QPrinter &printer );
42 protected:
43 bool doCloseDocument();
44 Okular::TextPage* textPage( Okular::Page *page );
46 private:
47 double m_resolution;
49 Okular::DocumentInfo *m_docInfo;
50 Okular::DocumentSynopsis *m_docSynopsis;
52 bool ready;
53 dviRenderer *m_dviRenderer;
55 void loadPages( QVector< Okular::Page * > & pagesVector );
56 Okular::TextPage *extractTextFromPage( dviPageInfo *pageInfo );
57 void fillViewportFromAnchor( Okular::DocumentViewport &vp, const Anchor &anch,
58 int pW, int pH );
59 QLinkedList<Okular::ObjectRect*> generateDviLinks( const dviPageInfo *pageInfo );
62 #endif