aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-pdf/mainUI.h
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-02-27 10:24:37 -0500
committerKen Moore <ken@ixsystems.com>2018-02-27 10:24:37 -0500
commit6f7bfe5269912021229e570675ac0fbd9ad4f082 (patch)
tree83e4f30b9ec64c71ec89c723cca5a59fa4dbc2a4 /src-qt5/desktop-utils/lumina-pdf/mainUI.h
parentAdded highlighting for search results (diff)
downloadlumina-6f7bfe5269912021229e570675ac0fbd9ad4f082.tar.gz
lumina-6f7bfe5269912021229e570675ac0fbd9ad4f082.tar.bz2
lumina-6f7bfe5269912021229e570675ac0fbd9ad4f082.zip
Get lumina-pdf all up and running again.
1. Abstract out the backend renderer into a new class 2. The Renderer can be selected at build time by setting the "USE_MUPDF" build flag to use mupdf instead of poppler (default).
Diffstat (limited to 'src-qt5/desktop-utils/lumina-pdf/mainUI.h')
-rw-r--r--src-qt5/desktop-utils/lumina-pdf/mainUI.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/src-qt5/desktop-utils/lumina-pdf/mainUI.h b/src-qt5/desktop-utils/lumina-pdf/mainUI.h
index bc121f7c..68245f16 100644
--- a/src-qt5/desktop-utils/lumina-pdf/mainUI.h
+++ b/src-qt5/desktop-utils/lumina-pdf/mainUI.h
@@ -19,8 +19,7 @@
#include <QApplication>
#include <QMenu>
-#include <mupdf/fitz.h>
-#include <mupdf/pdf.h>
+#include "Renderer.h"
#include "PresentationLabel.h"
#include "propDialog.h"
#include "PrintWidget.h"
@@ -39,17 +38,14 @@ public:
void loadFile(QString path);
private:
- fz_document *DOC;
- pdf_document *PDOC;
- fz_context *CTX;
- QSizeF pageSize;
+ QSizeF pageSize;
PrintWidget *WIDGET;
Ui::MainUI *ui;
PropDialog *PROPDIALOG;
QPrintDialog *PrintDLG;
QString lastdir;
bool matchCase;
- QList<TextData*> results;
+ QList<TextData*> results;
int currentHighlight;
//Other Interface elements
@@ -62,10 +58,10 @@ private:
QAction *clockAct, *pageAct;
//PDF Page Loading cache variables
+ Renderer *BACKEND;
QHash<int, QImage> loadingHash;
- int numPages;
- void loadPage(int num, fz_document *doc, MainUI *obj, QSize dpi);
+ void loadPage(int num, MainUI *obj, QSize dpi);
//Functions/variables for the presentation mode
PresentationLabel *presentationLabel;
@@ -83,7 +79,7 @@ private slots:
void nextPage(){ ShowPage( WIDGET->currentPage()+1 ); } //currentPage() starts at 1 rather than 0
void prevPage(){ ShowPage( WIDGET->currentPage()-1 ); } //currentPage() starts at 1 rather than 0
void firstPage(){ ShowPage(1); }
- void lastPage(){ ShowPage(numPages); }
+ void lastPage(){ ShowPage(BACKEND->numPages()); }
void startPresentationHere(){ startPresentation(false); }
void startPresentationBeginning(){ startPresentation(true); }
void closePresentation(){ endPresentation(); }
@@ -101,11 +97,11 @@ private slots:
void updatePageNumber();
void showContextMenu(const QPoint&){ contextMenu->popup(QCursor::pos()); }
void updateContextMenu();
- //void setScroll(bool);
+ //void setScroll(bool);
signals:
void PageLoaded(int);
- void sendDocument(fz_document*);
+ void sendDocument(fz_document*);
protected:
void keyPressEvent(QKeyEvent*);
bgstack15