aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-pdf/Renderer.h
diff options
context:
space:
mode:
authorZackaryWelch <welch.zackary@gmail.com>2018-04-27 17:26:02 -0400
committerZackaryWelch <welch.zackary@gmail.com>2018-04-27 17:26:02 -0400
commit253bacc6ee0d825564bef6aa507296e79b2611ff (patch)
tree0d87304383654f25f83259cdb0ae776706250c23 /src-qt5/desktop-utils/lumina-pdf/Renderer.h
parentMerge branch 'master' of http://github.com/trueos/lumina (diff)
downloadlumina-253bacc6ee0d825564bef6aa507296e79b2611ff.tar.gz
lumina-253bacc6ee0d825564bef6aa507296e79b2611ff.tar.bz2
lumina-253bacc6ee0d825564bef6aa507296e79b2611ff.zip
Added more annotation and widget support. Currently incomplete. Updated to MuPDF 1.13.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/Renderer.h')
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/Renderer.h46
1 files changed, 25 insertions, 21 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/Renderer.h b/src-qt5/desktop-utils/lumina-pdf/Renderer.h
index 4dd3e3b1..59d7024b 100644
--- a/src-qt5/desktop-utils/lumina-pdf/Renderer.h
+++ b/src-qt5/desktop-utils/lumina-pdf/Renderer.h
@@ -10,8 +10,12 @@
#include <QImage>
#include <QDebug>
#include <QJsonObject>
+#include <QMessageBox>
+#include <QProcess>
#include "TextData.h"
#include "Bookmark.h"
+#include "Annotation.h"
+#include "Widget.h"
class Renderer : public QObject {
Q_OBJECT
@@ -31,29 +35,29 @@ public:
bool loadMultiThread();
//Information functions (usually needs to be loaded first)
- int numPages(){ return pnum; }
- bool needPassword(){ return needpass; }
- QString title(){ return doctitle; }
- QJsonObject properties() { return jobj; }
- int hashSize();
- QImage imageHash(int pagenum);
- int rotatedDegrees() { return degrees; }
- QList<Bookmark*> getBookmarks() { return bookmarks; }
+ virtual int numPages(){ return pnum; }
+ virtual bool needPassword(){ return needpass; }
+ virtual QString title(){ return doctitle; }
+ virtual QJsonObject properties() { return jobj; }
+ virtual int hashSize();
+ virtual QImage imageHash(int pagenum);
+ virtual int rotatedDegrees() { return degrees; }
+ virtual QList<Bookmark*> getBookmarks() { return bookmarks; }
//Main access functions
- bool loadDocument(QString path, QString password);
- void renderPage(int pagenum, QSize DPI, int degrees=0);
- QList<TextData*> searchDocument(QString text, bool matchCase);
- void traverseOutline(void *, int);
- void handleLink(QString);
- TextData *linkList(int, int);
- int linkSize(int);
- QList<QString> annotList(int, int);
- int annotSize(int);
- QRectF annotLoc(int, int);
- bool isExternalLink(int, QString);
+ virtual bool loadDocument(QString path, QString password);
+ virtual void renderPage(int pagenum, QSize DPI, int degrees=0);
+ virtual QList<TextData*> searchDocument(QString text, bool matchCase);
+ virtual void traverseOutline(void *, int);
+ virtual void handleLink(QWidget*, QString);
+ virtual TextData *linkList(int, int);
+ virtual int linkSize(int);
+ virtual Annotation *annotList(int, int);
+ virtual int annotSize(int);
+ virtual Widget *widgetList(int, int);
+ virtual int widgetSize(int);
- void clearHash();
+ virtual void clearHash();
//Makes sure degrees is between 0 and 360 then rotates the matrix and
void setDegrees(int degrees) {
//Mods by 360, but adds and remods because of how C++ treats negative mods
@@ -61,7 +65,7 @@ public:
emit reloadPages(this->degrees);
}
- bool supportsExtraFeatures();
+ virtual bool supportsExtraFeatures();
signals:
void PageLoaded(int);
bgstack15