28#include <QAbstractScrollArea>
32#if XPDFWIDGET_PRINTING
43#ifdef HIGHLIGHTED_REGIONS
45typedef void *XpdfRegionHandle;
73 double xMaxA,
double yMaxA)
158 static void init(
const QString &configFileName = QString());
171 XpdfWidget(
const QColor &paperColor = QColor(0xff, 0xff, 0xff),
172 const QColor &matteColor = QColor(0x80, 0x80, 0x80),
173 bool reverseVideo =
false, QWidget *parentA = 0);
185 const QColor &paperColor = QColor(0xff, 0xff, 0xff),
186 const QColor &matteColor = QColor(0x80, 0x80, 0x80),
187 bool reverseVideo =
false);
269 const QString &password =
"");
278 const QString &password =
"");
298 const QString &fileName,
299 const QString &password =
"");
428 double xMax,
double yMax);
469 bool onLink(
int page,
double xx,
double yy);
518 double *xMin,
double *yMin,
519 double *xMax,
double *yMax);
524 int *page,
double *pdfX,
double *pdfY);
528 int *winX,
int *winY);
546 double *xMin,
double *yMin,
double *xMax,
double *yMax)
const;
573 double *x1,
double *y1)
const;
579 double x1,
double y1);
605#ifdef HIGHLIGHTED_REGIONS
613 XpdfRegionHandle addRegion(
int page,
614 double x0,
double y0,
615 double x1,
double y1,
616 const QColor &color,
const QColor &selectColor,
617 bool selectable,
const QString &label);
620 void setRegionLabel(XpdfRegionHandle region,
const QString &label);
623 void setRegionResizable(XpdfRegionHandle region,
bool resizable);
627 void deleteRegion(XpdfRegionHandle region);
631 void deleteAllRegions();
634 int getNumRegions()
const;
639 XpdfRegionHandle getRegion(
int idx)
const;
644 XpdfRegionHandle getSelectedRegion()
const;
647 void setSelectedRegion(XpdfRegionHandle region);
652 void makeRegionVisible(XpdfRegionHandle region);
658 void getRegionInfo(XpdfRegionHandle region,
659 int *page,
double *x0,
double *y0,
660 double *x1,
double *y1,
661 QColor *color, QColor *selectColor,
662 QString *label)
const;
668#if XPDFWIDGET_PRINTING
677 bool okToPrint()
const;
692 void cancelPrint() { printCanceled =
true; }
694 void updatePrintStatus(
int nextPage,
int firstPage,
int lastPage);
695 bool isPrintCanceled() {
return printCanceled; }
701 void setPrintDPI(
int hDPI,
int vDPI);
718 double x1,
double y1,
double dpi,
719 bool transparent =
false);
757 double x1,
double y1);
780 bool find(
const QString &text,
int flags = 0);
790 QVector<XpdfFindResult>
findAll(
const QString &text,
int firstPage,
791 int lastPage,
int flags = 0);
914 virtual QSize sizeHint()
const;
915 QtPDFCore *getCore() {
return core; }
995 void linkClick(
const QString &linkType,
const QString &dest,
int page);
1010#ifdef HIGHLIGHTED_REGIONS
1012 void regionSelected(XpdfRegionHandle region);
1015 void regionChanged(XpdfRegionHandle region);
1018#if XPDFWIDGET_PRINTING
1024 void printStatus(
int nextPage,
int firstPage,
int lastPage);
1037 virtual void paintEvent(QPaintEvent *eventA);
1038 virtual void resizeEvent(QResizeEvent *eventA);
1039 virtual void scrollContentsBy(
int dx,
int dy);
1040 virtual void keyPressEvent(QKeyEvent *e);
1041 virtual void mousePressEvent(QMouseEvent *e);
1042 virtual void mouseReleaseEvent(QMouseEvent *e);
1043 virtual void mouseMoveEvent(QMouseEvent *e);
1044 virtual void wheelEvent(QWheelEvent *e);
1045 virtual bool eventFilter(QObject *obj, QEvent *event);
1055 void setup(
const QColor &paperColor,
const QColor &matteColor,
1057 static void updateCbk(
void *data, GString *fileName,
1058 int pageNum,
int numPages,
1059 const char *linkLabel);
1060 static void midPageChangedCbk(
void *data,
int pageNum);
1061 static void preLoadCbk(
void *data);
1062 static void postLoadCbk(
void *data);
1063 static void linkCbk(
void *data,
const char *type,
1064 const char *dest,
int page);
1065 static void selectDoneCbk(
void *data);
1066 static void paintDoneCbk(
void *data,
bool finished);
1067 static void tileDoneCbk(
void *data);
1068#ifdef HIGHLIGHTED_REGIONS
1069 static void regionSelectedCbk(
void *data);
1070 static void regionChangedCbk(
void *data);
1073 friend class XpdfViewer;
1074 bool getLinkTarget(
int page,
double xx,
double yy,
1075 QString &targetFileName,
int &targetPage,
1076 QString &targetDest);
1078#if XPDFWIDGET_PRINTING
1079 QPrinter *printerForDialog;
1080 QPrintDialog *printDialog;
1081 int printHDPI, printVDPI;
1085 static QMutex initMutex;
1090 bool keyPassthrough;
1091 bool mousePassthrough;
1092 int lastMousePressX[3], lastMousePressY[3];
1093 ulong lastMousePressTime[3];
1094 bool lastMouseEventWasPress;
1096 bool touchPanEnabled;
1097 bool touchZoomEnabled;
1098 double pinchZoomStart;
Definition: XpdfWidget.h:69
int page
Definition: XpdfWidget.h:79
double xMax
Definition: XpdfWidget.h:83
double yMax
Definition: XpdfWidget.h:84
double yMin
Definition: XpdfWidget.h:82
double xMin
Definition: XpdfWidget.h:81