00001 /*************************************************************************** 00002 pbrowser.h - description 00003 ------------------- 00004 begin : Thu Jul 11 2002 00005 copyright : (C) 2002 by Ryan Rusaw 00006 email : rrusaw@sasktel.net 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 #ifndef PBROWSER_H 00018 #define PBROWSER_H 00019 00020 #include <qwidget.h> 00021 #include <qcanvas.h> 00022 #include <pparser.h> 00023 #include <qpe/process.h> 00024 #include <qpe/applnk.h> 00025 #include "unzip.h" 00026 #include "renderitems.h" 00027 00028 #define CM_TO_PXL 8 00029 #define SCALE_FACTOR 4.75 00030 00031 class RenderItems; 00032 00037 class PresentationBrowser : public QCanvasView 00038 { 00039 Q_OBJECT 00040 00041 public: 00049 PresentationBrowser (QCanvas *c, QWidget *w, const char *name, WFlags fl = 0); 00053 ~PresentationBrowser() { }; 00058 void parseFiles(const DocLnk &lnkDoc); 00063 int pageCount(); 00068 void renderPage(int i); 00072 void clearPage(); 00081 void setFactor(int f); 00086 void setReplace(bool r); 00090 PParser *handler; 00094 QList<QByteArray> objectfilelist; 00098 QList<QString> objectnamelist; 00103 void resizeEvent(QResizeEvent *e); 00108 void focusInEvent(QFocusEvent *e); 00112 void enableFullscreen(); 00116 void setFullscreen(bool); 00120 void showFullscreenPixmap(); 00121 00122 private: 00126 int pages; 00130 float factor; 00134 int thispage; 00138 bool replaceitems; 00142 bool fullscreen; 00147 void keyPressEvent(QKeyEvent *e); 00148 00149 protected: 00154 void contentsMousePressEvent(QMouseEvent *e); 00155 00156 signals: 00160 void renderProgressStart(int); 00164 void renderProgressUpdate(int); 00168 void offFullscreen(); 00172 void keyPressedInFullscreenEvent(QKeyEvent *); 00173 }; 00174 00175 #endif //PBROWSER_H