24#include <QAbstractScrollArea>
28#if XPDFWIDGET_PRINTING
39#ifdef HIGHLIGHTED_REGIONS
41typedef void *XpdfRegionHandle;
69 double xMaxA,
double yMaxA)
163 static void init(
const QString &configFileName = QString());
176 XpdfWidget(
const QColor &paperColor = QColor(0xff, 0xff, 0xff),
177 const QColor &matteColor = QColor(0x80, 0x80, 0x80),
178 bool reverseVideo =
false, QWidget *parentA = 0);
190 const QColor &paperColor = QColor(0xff, 0xff, 0xff),
191 const QColor &matteColor = QColor(0x80, 0x80, 0x80),
192 bool reverseVideo =
false);
274 const QString &password =
"");
283 const QString &password =
"");
303 const QString &fileName,
304 const QString &password =
"");
433 double xMax,
double yMax);
474 bool onLink(
int page,
double xx,
double yy);
523 double *xMin,
double *yMin,
524 double *xMax,
double *yMax);
529 int *page,
double *pdfX,
double *pdfY);
533 int *winX,
int *winY);
551 double *xMin,
double *yMin,
double *xMax,
double *yMax)
const;
578 double *x1,
double *y1)
const;
584 double x1,
double y1);
610#ifdef HIGHLIGHTED_REGIONS
618 XpdfRegionHandle addRegion(
int page,
619 double x0,
double y0,
620 double x1,
double y1,
621 const QColor &color,
const QColor &selectColor,
622 bool selectable,
const QString &label);
625 void setRegionLabel(XpdfRegionHandle region,
const QString &label);
628 void setRegionResizable(XpdfRegionHandle region,
bool resizable);
632 void deleteRegion(XpdfRegionHandle region);
636 void deleteAllRegions();
639 int getNumRegions()
const;
644 XpdfRegionHandle getRegion(
int idx)
const;
649 XpdfRegionHandle getSelectedRegion()
const;
652 void setSelectedRegion(XpdfRegionHandle region);
657 void makeRegionVisible(XpdfRegionHandle region);
663 void getRegionInfo(XpdfRegionHandle region,
664 int *page,
double *x0,
double *y0,
665 double *x1,
double *y1,
666 QColor *color, QColor *selectColor,
667 QString *label)
const;
673#if XPDFWIDGET_PRINTING
682 bool okToPrint()
const;
697 void cancelPrint() { printCanceled =
true; }
699 void updatePrintStatus(
int nextPage,
int firstPage,
int lastPage);
700 bool isPrintCanceled() {
return printCanceled; }
706 void setPrintDPI(
int hDPI,
int vDPI);
730 double x1,
double y1,
double dpi,
731 bool transparent =
false,
770 double x1,
double y1);
793 bool find(
const QString &text,
int flags = 0);
803 QVector<XpdfFindResult>
findAll(
const QString &text,
int firstPage,
804 int lastPage,
int flags = 0);
927 virtual QSize sizeHint()
const;
928 QtPDFCore *getCore() {
return core; }
1008 void linkClick(
const QString &linkType,
const QString &dest,
int page);
1023#ifdef HIGHLIGHTED_REGIONS
1025 void regionSelected(XpdfRegionHandle region);
1028 void regionChanged(XpdfRegionHandle region);
1031#if XPDFWIDGET_PRINTING
1037 void printStatus(
int nextPage,
int firstPage,
int lastPage);
1050 virtual void paintEvent(QPaintEvent *eventA);
1051 virtual void resizeEvent(QResizeEvent *eventA);
1052 virtual void scrollContentsBy(
int dx,
int dy);
1053 virtual void keyPressEvent(QKeyEvent *e);
1054 virtual void mousePressEvent(QMouseEvent *e);
1055 virtual void mouseReleaseEvent(QMouseEvent *e);
1056 virtual void mouseMoveEvent(QMouseEvent *e);
1057 virtual void wheelEvent(QWheelEvent *e);
1058 virtual bool eventFilter(QObject *obj, QEvent *event);
1068 void setup(
const QColor &paperColor,
const QColor &matteColor,
1070 static void updateCbk(
void *data, GString *fileName,
1071 int pageNum,
int numPages,
1072 const char *linkLabel);
1073 static void midPageChangedCbk(
void *data,
int pageNum);
1074 static void preLoadCbk(
void *data);
1075 static void postLoadCbk(
void *data);
1076 static void linkCbk(
void *data,
const char *type,
1077 const char *dest,
int page);
1078 static void selectDoneCbk(
void *data);
1079 static void paintDoneCbk(
void *data,
bool finished);
1080 static void tileDoneCbk(
void *data);
1081#ifdef HIGHLIGHTED_REGIONS
1082 static void regionSelectedCbk(
void *data);
1083 static void regionChangedCbk(
void *data);
1086 friend class XpdfViewer;
1087 bool getLinkTarget(
int page,
double xx,
double yy,
1088 QString &targetFileName,
int &targetPage,
1089 QString &targetDest);
1091#if XPDFWIDGET_PRINTING
1092 QPrinter *printerForDialog;
1093 QPrintDialog *printDialog;
1094 int printHDPI, printVDPI;
1098 static QMutex initMutex;
1103 bool keyPassthrough;
1104 bool mousePassthrough;
1105 int lastMousePressX[3], lastMousePressY[3];
1106 ulong lastMousePressTime[3];
1107 bool lastMouseEventWasPress;
1109 bool touchPanEnabled;
1110 bool touchZoomEnabled;
1111 double pinchZoomStart;
Definition: XpdfWidget.h:65
int page
Definition: XpdfWidget.h:75
double xMax
Definition: XpdfWidget.h:79
double yMax
Definition: XpdfWidget.h:80
double yMin
Definition: XpdfWidget.h:78
double xMin
Definition: XpdfWidget.h:77