• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kviewshell

djvurenderer.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Stefan Kebekus                                  *
00003  *   kebekus@kde.org                                                       *
00004  *                                                                         *
00005  *   Copyright (C) 2005 by Wilfried Huss                                   *
00006  *   Wilfried.Huss@gmx.at                                                  *
00007  *                                                                         *
00008  *   This program is free software; you can redistribute it and/or modify  *
00009  *   it under the terms of the GNU General Public License as published by  *
00010  *   the Free Software Foundation; either version 2 of the License, or     *
00011  *   (at your option) any later version.                                   *
00012  *                                                                         *
00013  *   This program is distributed in the hope that it will be useful,       *
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00016  *   GNU General Public License for more details.                          *
00017  *                                                                         *
00018  *   You should have received a copy of the GNU General Public License     *
00019  *   along with this program; if not, write to the                         *
00020  *   Free Software Foundation, Inc.,                                       *
00021  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *
00022  ***************************************************************************/
00023 
00024 #ifndef _DJVURENDERER_H_
00025 #define _DJVURENDERER_H_
00026 
00027 #include <kprogress.h>
00028 #include <qpixmap.h>
00029 
00030 #include "DjVuImage.h"
00031 #include "DjVuDocEditor.h"
00032 #include "DjVuText.h"
00033 #include "DjVuToPS.h"
00034 #include "ByteStream.h"
00035 
00036 #include "documentRenderer.h"
00037 
00038 class RenderedDocumentPage;
00039 
00051 class DjVuRenderer : public DocumentRenderer
00052 {
00053   Q_OBJECT
00054 
00055 public:
00060    DjVuRenderer(QWidget* parent);
00061 
00068   ~DjVuRenderer();
00069 
00080   virtual bool setFile(const QString& fname, const KURL &);
00081 
00086   virtual void drawPage(double res, RenderedDocumentPage* page);
00087 
00093   virtual void getText(RenderedDocumentPage* page);
00094 
00095   virtual bool supportsTextSearch() const { return true; };
00096 
00113   bool convertToPSFile( DjVuToPS &converter, QString filename, QValueList<int> &pageList );
00114 
00116   void deletePages(Q_UINT16 from, Q_UINT16 to);
00117 
00119   bool save(const QString &filename);
00120 
00121 private:
00122   /* This method is called after a document is loaded with
00123      create_wait() or has been modified (e.g. inserting/deleting
00124      pages). It sets "numPages", fills the "pageSizes" array, and
00125      clear the anchorList. */
00126   bool initializeDocument();
00127 
00128   void getAnnotations(RenderedDocumentPage* page, GP<DjVuImage> djvuPage);
00129 
00130   bool getPageInfo(GP<DjVuFile> file, int& width, int& height, int& dpi);
00131 
00132   GP<DjVuTXT> getText(PageNumber pageNumber);
00133 
00134   void fillInText(RenderedDocumentPage* page, const GP<DjVuTXT>& text, DjVuTXT::Zone& zone, QSize& djvuPageSize);
00135 
00136   GP<DjVuDocEditor> document;
00137 
00140   static void printerInfoCallBack(int page_num, int page_count, int tot_pages, DjVuToPS::Stage, void *);
00141 
00142   QPixmap pixmap;
00143   GP<ByteStream> PPMstream;
00144 };
00145 
00146 #endif

kviewshell

Skip menu "kviewshell"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • kviewshell
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal