xpdf  4.04
About: Xpdf is a PDF viewer for X.
  Fossies Dox: xpdf-4.04.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

XpdfWidget Class Reference

A PDF viewer widget class for Qt. More...

#include <XpdfWidget.h>

Inheritance diagram for XpdfWidget:
[legend]
Collaboration diagram for XpdfWidget:
[legend]

Public Types

enum  ErrorCode {
  pdfOk = 0 , pdfErrOpenFile = 1 , pdfErrBadCatalog = 2 , pdfErrDamaged = 3 ,
  pdfErrEncrypted = 4 , pdfErrHighlightFile = 5 , pdfErrBadPrinter = 6 , pdfErrPrinting = 7 ,
  pdfErrPermission = 8 , pdfErrBadPageNum = 9 , pdfErrFileIO = 10 , pdfErrNoHandle = 1001 ,
  pdfErrOutOfMemory = 1002 , pdfErrBusy = 1003 , pdfErrBadArg = 1004
}
 Error codes returned by certain XpdfViewer functions. More...
 
enum  DisplayMode {
  pdfDisplaySingle , pdfDisplayContinuous , pdfDisplaySideBySideSingle , pdfDisplaySideBySideContinuous ,
  pdfDisplayHorizontalContinuous
}
 Display modes, to be passed to XpdfWidget::setDisplayMode(). More...
 

Static Public Attributes

Zoom values
static const int zoomToPage = -1
 zoom to fit whole page More...
 
static const int zoomToWidth = -2
 zoom to fit page width More...
 
static const int zoomToHeight = -3
 zoom to fit page height More...
 

Find flags

Flags to be passed to XpdfWidget::find()

static const int findBackward = 0x00000001
 search backward from the starting point More...
 
static const int findCaseSensitive = 0x00000002
 perform a case-sensitive search (default is case-insensitive) More...
 
static const int findNext = 0x00000004
 start searching from the previous search result More...
 
static const int findOnePageOnly = 0x00000008
 limit the search to the current page More...
 
static const int findWholeWord = 0x00000010
 limit the search to whole words More...
 
class XpdfViewer
 
static QMutex initMutex
 
QtPDFCorecore
 
double scaleFactor
 
bool keyPassthrough
 
bool mousePassthrough
 
int lastMousePressX [3]
 
int lastMousePressY [3]
 
ulong lastMousePressTime [3]
 
bool lastMouseEventWasPress
 
bool touchPanEnabled
 
bool touchZoomEnabled
 
double pinchZoomStart
 
QTimer * tickTimer
 
static void init (const QString &configFileName=QString())
 
static void setConfig (const QString &command)
 
 XpdfWidget (const QColor &paperColor=QColor(0xff, 0xff, 0xff), const QColor &matteColor=QColor(0x80, 0x80, 0x80), bool reverseVideo=false, QWidget *parentA=0)
 
 XpdfWidget (QWidget *parentA, const QColor &paperColor=QColor(0xff, 0xff, 0xff), const QColor &matteColor=QColor(0x80, 0x80, 0x80), bool reverseVideo=false)
 
virtual ~XpdfWidget ()
 Destroys the XpdfWidget. More...
 
void enableHyperlinks (bool on)
 
void enableExternalHyperlinks (bool on)
 
void enableSelect (bool on)
 
void enablePan (bool on)
 
void enableTouchPan (bool on)
 
void enableTouchZoom (bool on)
 
void setKeyPassthrough (bool on)
 
void setMousePassthrough (bool on)
 
void showPasswordDialog (bool showDlg)
 
void setMatteColor (const QColor &matteColor)
 
void setReverseVideo (bool reverse)
 Turn reverse video mode on/off. The default is off. More...
 
void setCursor (const QCursor &cursor)
 
void unsetCursor ()
 Reset to the default cursor. More...
 
ErrorCode loadFile (const QString &fileName, const QString &password="")
 
ErrorCode loadMem (const char *buffer, unsigned int bufferLength, const QString &password="")
 
ErrorCode readDoc (XpdfDocHandle *docPtr, const QString &fileName, const QString &password="")
 Load a PDF file and return a handle. More...
 
ErrorCode loadDoc (XpdfDocHandle doc)
 
void freeDoc (XpdfDocHandle doc)
 
ErrorCode reload ()
 
void closeFile ()
 
ErrorCode saveAs (const QString &fileName)
 
QString getFileName () const
 Get the file name of the currently open PDF file. More...
 
bool hasOpenDocument () const
 Returns true if there is currently a PDF file open. More...
 
int getNumPages () const
 
int getCurrentPage () const
 
int getMidPage () const
 
void gotoPage (int pageNum)
 Display the specified page. More...
 
void gotoFirstPage ()
 
void gotoLastPage ()
 
void gotoNextPage (bool scrollToTop=true)
 Display the next page. More...
 
void gotoPreviousPage (bool scrollToTop=true)
 Display the previous page. More...
 
bool gotoNamedDestination (const QString &dest)
 Go to a named destination. More...
 
void goForward ()
 Go forward along the history list. More...
 
void goBackward ()
 Go backward along the history list. More...
 
void scrollPageUp ()
 Scroll one screen up. More...
 
void scrollPageDown ()
 Scroll one screen down. More...
 
void scrollTo (int xx, int yy)
 
void scrollBy (int dx, int dy)
 
int getScrollX () const
 Return the current scroll position x coordinate. More...
 
int getScrollY () const
 Return the current scroll position y coordinate. More...
 
void setZoom (double zoom)
 
double getZoom () const
 
double getZoomPercent (int page=1) const
 
void zoomToRect (int page, double xMin, double yMin, double xMax, double yMax)
 
void zoomCentered (double zoom)
 
void zoomToCurrentWidth ()
 
void setRotate (int rotate)
 
int getRotate () const
 
void setContinuousMode (bool continuous)
 
bool getContinuousMode () const
 
void setDisplayMode (DisplayMode mode)
 Set the display mode. More...
 
DisplayMode getDisplayMode ()
 Return the current display mode. More...
 
bool mouseOverLink ()
 Returns true if the mouse is currently over a hyperlink. More...
 
bool onLink (int page, double xx, double yy)
 
QString getLinkInfo (int page, double xx, double yy)
 
QString getMouseLinkInfo ()
 
bool gotoLinkAt (int page, double xx, double yy)
 
XpdfAnnotHandle onAnnot (int page, double xx, double yy)
 
QString getAnnotType (XpdfAnnotHandle annot)
 Get the annotation type. More...
 
QString getAnnotContent (XpdfAnnotHandle annot)
 
XpdfFormFieldHandle onFormField (int page, double xx, double yy)
 
QString getFormFieldType (XpdfFormFieldHandle field)
 Get the form field's type. More...
 
QString getFormFieldName (XpdfFormFieldHandle field)
 Get the form field's name. More...
 
QString getFormFieldValue (XpdfFormFieldHandle field)
 
void getFormFieldBBox (XpdfFormFieldHandle field, int *pageNum, double *xMin, double *yMin, double *xMax, double *yMax)
 Get the form field's bounding box. More...
 
bool convertWindowToPDFCoords (int winX, int winY, int *page, double *pdfX, double *pdfY)
 
void convertPDFToWindowCoords (int page, double pdfX, double pdfY, int *winX, int *winY)
 Convert PDF coordinates to window coordinates. More...
 
void enableRedraw (bool enable)
 
void getPageBox (int page, const QString &box, double *xMin, double *yMin, double *xMax, double *yMax) const
 
double getPageWidth (int page) const
 
double getPageHeight (int page) const
 
int getPageRotation (int page) const
 
bool hasSelection ()
 
bool getCurrentSelection (int *page, double *x0, double *y0, double *x1, double *y1) const
 
void setCurrentSelection (int page, double x0, double y0, double x1, double y1)
 
void clearSelection ()
 Clear the selection. More...
 
bool isBlockSelectMode ()
 
bool isLinearSelectMode ()
 
void setBlockSelectMode ()
 
void setLinearSelectMode ()
 
void setSelectionColor (const QColor &selectionColor)
 Set the selection color. More...
 
void forceRedraw ()
 Force a complete redraw. More...
 
QImage convertPageToImage (int page, double dpi, bool transparent=false)
 
QImage convertRegionToImage (int page, double x0, double y0, double x1, double y1, double dpi, bool transparent=false)
 
QImage getThumbnail (int page)
 
bool okToExtractText () const
 
void setTextEncoding (const QString &encodingName)
 
QString extractText (int page, double x0, double y0, double x1, double y1)
 
QString getSelectedText ()
 
void copySelection ()
 Copy the current selection to the clipboard. More...
 
bool find (const QString &text, int flags=0)
 
QVector< XpdfFindResultfindAll (const QString &text, int firstPage, int lastPage, int flags=0)
 
bool hasPageLabels ()
 
QString getPageLabelFromPageNum (int pageNum)
 
int getPageNumFromPageLabel (QString pageLabel)
 
int getOutlineNumChildren (XpdfOutlineHandle outline)
 
XpdfOutlineHandle getOutlineChild (XpdfOutlineHandle outline, int idx)
 
XpdfOutlineHandle getOutlineParent (XpdfOutlineHandle outline)
 
QString getOutlineTitle (XpdfOutlineHandle outline)
 
bool getOutlineStartsOpen (XpdfOutlineHandle outline)
 Return true if the specified outline entry starts open. More...
 
int getOutlineTargetPage (XpdfOutlineHandle outline)
 Return the target page number for the specified outline entry. More...
 
void gotoOutlineTarget (XpdfOutlineHandle outline)
 Jump to the target of the specified outline entry. More...
 
int getNumLayers () const
 
XpdfLayerHandle getLayer (int idx) const
 
QString getLayerName (XpdfLayerHandle layer) const
 
bool getLayerVisibility (XpdfLayerHandle layer) const
 
void setLayerVisibility (XpdfLayerHandle layer, bool visibility)
 
int getLayerViewState (XpdfLayerHandle layer) const
 
int getLayerPrintState (XpdfLayerHandle layer) const
 
XpdfLayerOrderHandle getLayerOrderRoot () const
 Get the root of the layer display order tree. More...
 
bool getLayerOrderIsName (XpdfLayerOrderHandle order) const
 
QString getLayerOrderName (XpdfLayerOrderHandle order) const
 
XpdfLayerHandle getLayerOrderLayer (XpdfLayerOrderHandle order)
 Get the layer associated with a layer display order tree node. More...
 
int getLayerOrderNumChildren (XpdfLayerOrderHandle order)
 
XpdfLayerOrderHandle getLayerOrderChild (XpdfLayerOrderHandle order, int idx)
 Returns the idx 'th child of a layer display order tree node. More...
 
XpdfLayerOrderHandle getLayerOrderParent (XpdfLayerOrderHandle order)
 
int getNumEmbeddedFiles ()
 Return the number of embedded files in the current PDF file. More...
 
QString getEmbeddedFileName (int idx)
 Return the name of the idx 'th embedded file. More...
 
bool saveEmbeddedFile (int idx, QString fileName)
 
void pageChange (int pageNum)
 
void midPageChange (int pageNum)
 
void preLoad ()
 This signal is emitted just before a PDF file is loaded. More...
 
void postLoad ()
 This signal is emitted just after a PDF file is loaded. More...
 
void keyPress (QKeyEvent *e)
 This signal is emitted whenever a key is pressed. More...
 
void mousePress (QMouseEvent *e)
 This signal is emitted whenever a mouse button is pressed. More...
 
void mouseRelease (QMouseEvent *e)
 This signal is emitted whenever a mouse button is released. More...
 
void mouseClick (QMouseEvent *e)
 
void mouseDoubleClick (QMouseEvent *e)
 
void mouseTripleClick (QMouseEvent *e)
 
void mouseMove (QMouseEvent *e)
 This signal is emitted whenever the mouse pointer is moved. More...
 
void mouseWheel (QWheelEvent *e)
 This signal is emitted whenever a mouse wheel is clicked. More...
 
void linkClick (const QString &linkType, const QString &dest, int page)
 
void selectDone ()
 
void paintDone (bool finished)
 
void resized ()
 This signal is emitted when the widget is resized. More...
 
void tick ()
 
void setup (const QColor &paperColor, const QColor &matteColor, bool reverseVideo)
 
bool getLinkTarget (int page, double xx, double yy, QString &targetFileName, int &targetPage, QString &targetDest)
 
static void updateCbk (void *data, GString *fileName, int pageNum, int numPages, const char *linkLabel)
 
static void midPageChangedCbk (void *data, int pageNum)
 
static void preLoadCbk (void *data)
 
static void postLoadCbk (void *data)
 
static void linkCbk (void *data, const char *type, const char *dest, int page)
 
static void selectDoneCbk (void *data)
 
static void paintDoneCbk (void *data, bool finished)
 
static void tileDoneCbk (void *data)
 

Detailed Description

A PDF viewer widget class for Qt.

Definition at line 86 of file XpdfWidget.h.

Member Enumeration Documentation

◆ DisplayMode

Display modes, to be passed to XpdfWidget::setDisplayMode().

Enumerator
pdfDisplaySingle 

single page

pdfDisplayContinuous 

pages stacked vertically

pdfDisplaySideBySideSingle 

two facing pages

pdfDisplaySideBySideContinuous 

facing pages, stacked vertically

pdfDisplayHorizontalContinuous 

pages stacked horizontally

Definition at line 113 of file XpdfWidget.h.

◆ ErrorCode

Error codes returned by certain XpdfViewer functions.

Enumerator
pdfOk 

no error

pdfErrOpenFile 

couldn't open the PDF file

pdfErrBadCatalog 

couldn't read the page catalog

pdfErrDamaged 

repaired

PDF file was damaged and couldn't be

pdfErrEncrypted 

incorrect or not supplied

file was encrypted and password was

pdfErrHighlightFile 

nonexistent or invalid highlight file

pdfErrBadPrinter 

invalid printer

pdfErrPrinting 

error during printing

pdfErrPermission 

PDF file doesn't allow that operation.

pdfErrBadPageNum 

invalid page number

pdfErrFileIO 

file I/O error

pdfErrNoHandle 

NULL object handle.

pdfErrOutOfMemory 

out of memory

pdfErrBusy 

PDF component is busy.

pdfErrBadArg 

invalid argument

Definition at line 92 of file XpdfWidget.h.

Constructor & Destructor Documentation

◆ XpdfWidget() [1/2]

XpdfWidget::XpdfWidget ( const QColor &  paperColor = QColor(0xff, 0xff, 0xff),
const QColor &  matteColor = QColor(0x80, 0x80, 0x80),
bool  reverseVideo = false,
QWidget *  parentA = 0 
)

The XpdfWidget constructor.

Parameters
paperColorthe paper background color (which should generally be left as white)
matteColorthe matte color displayed between pages, and around pages that are smaller than the window
reverseVideosets reverse video at startup
parentAthe parent QWidget

Definition at line 64 of file XpdfWidget.cc.

References setup().

◆ XpdfWidget() [2/2]

XpdfWidget::XpdfWidget ( QWidget *  parentA,
const QColor &  paperColor = QColor(0xff, 0xff, 0xff),
const QColor &  matteColor = QColor(0x80, 0x80, 0x80),
bool  reverseVideo = false 
)

The XpdfWidget constructor.

Parameters
paperColorthe paper background color (which should generally be left as white)
matteColorthe matte color displayed between pages, and around pages that are smaller than the window
reverseVideosets reverse video at startup
parentAthe parent QWidget This version has the parent argument first so it works correctly with Qt Designer.

Definition at line 71 of file XpdfWidget.cc.

References setup().

◆ ~XpdfWidget()

XpdfWidget::~XpdfWidget ( )
virtual

Destroys the XpdfWidget.

Definition at line 132 of file XpdfWidget.cc.

References core, and tickTimer.

Member Function Documentation

◆ clearSelection()

void XpdfWidget::clearSelection ( )

Clear the selection.

Definition at line 1142 of file XpdfWidget.cc.

References PDFCore::clearSelection(), and core.

◆ closeFile()

void XpdfWidget::closeFile ( )

Close the currently open PDF file (if any). Calling this function is optional - the current PDF file will be automatically closed if XpdfWidget::loadFile or XpdfWidget::loadMem is called.

Definition at line 434 of file XpdfWidget.cc.

References PDFCore::clear(), and core.

Referenced by XpdfViewer::closeTab().

◆ convertPageToImage()

QImage XpdfWidget::convertPageToImage ( int  page,
double  dpi,
bool  transparent = false 
)

Convert a page to a color image. This function converts the page number page to a 24-bit RGB bitmap, at a resolution of dpi dots per inch. If transparent is true, the returned image will be 32-bit ARGB instead, and will include an alpha channel.

Definition at line 1269 of file XpdfWidget.cc.

References core, PDFDoc::displayPage(), doc, SplashBitmap::getAlphaPtr(), SplashOutputDev::getBitmap(), SplashBitmap::getDataPtr(), PDFCore::getDoc(), SplashBitmap::getHeight(), PDFDoc::getNumPages(), PDFCore::getRotate(), SplashBitmap::getWidth(), PDFDoc::getXRef(), gFalse, gTrue, SplashOutputDev::setNoComposite(), splashModeRGB8, and SplashOutputDev::startDoc().

Referenced by XpdfViewer::execSaveImageDialog().

◆ convertPDFToWindowCoords()

void XpdfWidget::convertPDFToWindowCoords ( int  page,
double  pdfX,
double  pdfY,
int *  winX,
int *  winY 
)

Convert PDF coordinates to window coordinates.

Definition at line 1019 of file XpdfWidget.cc.

References core, and PDFCore::cvtUserToWindow().

◆ convertRegionToImage()

QImage XpdfWidget::convertRegionToImage ( int  page,
double  x0,
double  y0,
double  x1,
double  y1,
double  dpi,
bool  transparent = false 
)

Convert a rectangular region of a page to a color image. This function converts a rectangular region, defined by corners (x0,y0) and (x1,y1), of page number page to a 24-bit RGB bitmap, at a resolution of dpi dots per inch. If transparent is true, the returned image will be 32-bit ARGB instead, and will include an alpha channel.

Definition at line 1326 of file XpdfWidget.cc.

References core, PDFDoc::displayPageSlice(), doc, SplashBitmap::getAlphaPtr(), SplashOutputDev::getBitmap(), PDFDoc::getCatalog(), Page::getCropBox(), SplashBitmap::getDataPtr(), PDFCore::getDoc(), SplashBitmap::getHeight(), PDFDoc::getNumPages(), Catalog::getPage(), PDFDoc::getPageRotate(), PDFCore::getRotate(), SplashBitmap::getWidth(), PDFDoc::getXRef(), gFalse, gTrue, SplashOutputDev::setNoComposite(), splashModeRGB8, SplashOutputDev::startDoc(), PDFRectangle::x1, PDFRectangle::x2, PDFRectangle::y1, and PDFRectangle::y2.

Referenced by XpdfViewer::execSaveImageDialog().

◆ convertWindowToPDFCoords()

bool XpdfWidget::convertWindowToPDFCoords ( int  winX,
int  winY,
int *  page,
double *  pdfX,
double *  pdfY 
)

Convert window coordinates to PDF coordinates. Returns true if successful, i.e., if the specified point falls on a PDF page.

Definition at line 1009 of file XpdfWidget.cc.

References core, and PDFCore::cvtWindowToUser().

Referenced by XpdfViewer::cmdRun(), XpdfViewer::followLink(), XpdfViewer::mouseMove(), and mouseOverLink().

◆ copySelection()

void XpdfWidget::copySelection ( )

Copy the current selection to the clipboard.

Definition at line 1559 of file XpdfWidget.cc.

References QtPDFCore::copySelection(), core, and gTrue.

Referenced by XpdfViewer::cmdCopy().

◆ enableExternalHyperlinks()

void XpdfWidget::enableExternalHyperlinks ( bool  on)

Control handling of external hyperlinks. This setting allows disabling external hyperlinks (links that open another PDF file, or that involve a URL), independent of internal hyperlinks (links to locations within the same PDF file). This setting is ignored if all hyperlinks are disabled (enableHyperlinks(false)). The default is enabled.

Definition at line 214 of file XpdfWidget.cc.

References core, and QtPDFCore::enableExternalHyperlinks().

◆ enableHyperlinks()

void XpdfWidget::enableHyperlinks ( bool  on)

Control handling of hyperlinks. If enabled, the viewer will follow hyperlinks when clicked with the left mouse button. If disabled, the viewer will ignore left mouse button clicks on hyperlinks. The default is enabled.

Definition at line 207 of file XpdfWidget.cc.

References core, and QtPDFCore::enableHyperlinks().

Referenced by XpdfViewer::addTab().

◆ enablePan()

void XpdfWidget::enablePan ( bool  on)

Control mouse panning. If enabled, dragging with the middle mouse button pressed will pan the page. If disabled, the middle button is ignored. The default is enabled.

Definition at line 228 of file XpdfWidget.cc.

References core, and QtPDFCore::enablePan().

◆ enableRedraw()

void XpdfWidget::enableRedraw ( bool  enable)

Enable or disable window redraws. This is useful, e.g., for avoiding extra redraws during window resizing. Deprecated – this just calls setUpdatesEnabled().

Definition at line 1027 of file XpdfWidget.cc.

◆ enableSelect()

void XpdfWidget::enableSelect ( bool  on)

Control handling of text selection. If enabled, the viewer will allow the user to select rectangular regions of text when the user drags with the left mouse button. If disabled, dragging with the left mouse button is ignored. The default is enabled.

Definition at line 221 of file XpdfWidget.cc.

References core, and QtPDFCore::enableSelect().

◆ enableTouchPan()

void XpdfWidget::enableTouchPan ( bool  on)

Control touchscreen panning. If enabled, QPanGestures are recognized and used to pan the PDF view.

Definition at line 235 of file XpdfWidget.cc.

References touchPanEnabled.

◆ enableTouchZoom()

void XpdfWidget::enableTouchZoom ( bool  on)

Control touchscreen zooming. If enabled QPinchGestures are recognized and used to pinch-zoom the PDF view.

Definition at line 244 of file XpdfWidget.cc.

References touchZoomEnabled.

◆ extractText()

QString XpdfWidget::extractText ( int  page,
double  x0,
double  y0,
double  x1,
double  y1 
)

Extract text from a region of a page. This function extracts and returns text from the rectangular region, defined by corners (x0,y0) and (x1,y1), of page number page. The coordinates returned by XpdfWidget::getCurrentSelection may be passed directly to this function. Returns an empty string if no file is open or if text extraction is not allowed.

Definition at line 1519 of file XpdfWidget.cc.

References GString::append(), GString::cmp(), core, PDFCore::extractText(), GString::getChar(), GString::getCString(), PDFCore::getDoc(), GString::getLength(), GlobalParams::getTextEncodingName(), and globalParams.

◆ find()

bool XpdfWidget::find ( const QString &  text,
int  flags = 0 
)

Find a text string. This function searches for a Unicode text string. Starts searching after (before, if searching backward) the current selection (if there is a selection), or at the top (bottom, if searching backward) of the current page (if there is no selection). The flags argument consists of zero or more of the following, or-ed together:

  • findBackward - search backward from the starting point
  • findCaseSensitive - perform a case-sensitive search (default is case-insensitive)
  • findNext - start searching from the previous search result
  • findOnePageOnly - limit the search to the current page
  • findWholeWord - limit the search to whole words

Definition at line 1566 of file XpdfWidget.cc.

References core, findBackward, findCaseSensitive, findNext, findOnePageOnly, QtPDFCore::findU(), findWholeWord, PDFCore::getDoc(), gFalse, gfree(), gmallocn(), gTrue, and u.

Referenced by XpdfViewer::cmdFindFirst(), XpdfViewer::cmdFindNext(), and XpdfViewer::cmdFindPrevious().

◆ findAll()

QVector< XpdfFindResult > XpdfWidget::findAll ( const QString &  text,
int  firstPage,
int  lastPage,
int  flags = 0 
)

Find all occurrences of a text string. This function searches for a Unicode text string, in pages firstPage .. lastPage. The flags argument consists of zero or more of the following, or-ed together:

  • findCaseSensitive - perform a case-sensitive search (default is case-insensitive)
  • findWholeWord - limit the search to whole words Returns a list of search results.

Definition at line 1593 of file XpdfWidget.cc.

References core, deleteGList, PDFCore::findAll(), findCaseSensitive, findWholeWord, firstPage, GList::get(), PDFCore::getDoc(), GList::getLength(), gFalse, gfree(), gmallocn(), gTrue, lastPage, FindResult::page, u, FindResult::xMax, FindResult::xMin, FindResult::yMax, and FindResult::yMin.

◆ forceRedraw()

void XpdfWidget::forceRedraw ( )

Force a complete redraw.

Definition at line 1192 of file XpdfWidget.cc.

References core, and PDFCore::forceRedraw().

◆ freeDoc()

void XpdfWidget::freeDoc ( XpdfDocHandle  doc)

Free a PDF document. This function frees a PDF document handle created by XpdfWidget::readDoc. It should only be called if the document is not going to be displayed. That is: after calling XpdfWidget::readDoc, you should call either XpdfWidget::loadDoc or XpdfWidget::freeDoc. The document handle should not be used for anything else after calling this function.

Definition at line 419 of file XpdfWidget.cc.

References doc.

◆ getAnnotContent()

QString XpdfWidget::getAnnotContent ( XpdfAnnotHandle  annot)

Get the annotation's content. Usage of this depends on the annotation type.

Definition at line 921 of file XpdfWidget.cc.

References Object::dictLookup(), Object::free(), TextString::getLength(), Object::getString(), TextString::getUnicode(), Object::isString(), and u.

◆ getAnnotType()

QString XpdfWidget::getAnnotType ( XpdfAnnotHandle  annot)

Get the annotation type.

Definition at line 913 of file XpdfWidget.cc.

◆ getContinuousMode()

bool XpdfWidget::getContinuousMode ( ) const

Return true if the viewer is in continuous view mode, or false if it is in any other mode. Deprecated: see getDisplayMode().

Definition at line 703 of file XpdfWidget.cc.

References core, displayContinuous, and PDFCore::getDisplayMode().

◆ getCurrentPage()

int XpdfWidget::getCurrentPage ( ) const

Return the currently displayed page number. Returns -1 if no file is open.

Definition at line 494 of file XpdfWidget.cc.

References core, and PDFCore::getPageNum().

◆ getCurrentSelection()

bool XpdfWidget::getCurrentSelection ( int *  page,
double *  x0,
double *  y0,
double *  x1,
double *  y1 
) const

Returns the current selection. If there is a currently active selection, sets *page, (*x0,*y0), and (*x1,*y1) to the page number and upper-left and lower-right coordinates, respectively, and returns true. If there is no selection, returns false.

Definition at line 1115 of file XpdfWidget.cc.

References core, and PDFCore::getSelection().

Referenced by XpdfViewer::cmdRun(), XpdfViewer::cmdZoomToSelection(), and XpdfViewer::execSaveImageDialog().

◆ getDisplayMode()

◆ getEmbeddedFileName()

QString XpdfWidget::getEmbeddedFileName ( int  idx)

Return the name of the idx 'th embedded file.

Definition at line 1977 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), PDFDoc::getEmbeddedFileName(), PDFDoc::getEmbeddedFileNameLength(), PDFDoc::getNumEmbeddedFiles(), and name.

Referenced by XpdfViewer::fillAttachmentList().

◆ getFileName()

◆ getFormFieldBBox()

void XpdfWidget::getFormFieldBBox ( XpdfFormFieldHandle  field,
int *  pageNum,
double *  xMin,
double *  yMin,
double *  xMax,
double *  yMax 
)

Get the form field's bounding box.

Definition at line 999 of file XpdfWidget.cc.

◆ getFormFieldName()

QString XpdfWidget::getFormFieldName ( XpdfFormFieldHandle  field)

Get the form field's name.

Definition at line 965 of file XpdfWidget.cc.

References gfree(), and u.

◆ getFormFieldType()

QString XpdfWidget::getFormFieldType ( XpdfFormFieldHandle  field)

Get the form field's type.

Definition at line 957 of file XpdfWidget.cc.

◆ getFormFieldValue()

QString XpdfWidget::getFormFieldValue ( XpdfFormFieldHandle  field)

Get the form field's content. Usage of this depends on the field type.

Definition at line 982 of file XpdfWidget.cc.

References gfree(), and u.

◆ getLayer()

XpdfLayerHandle XpdfWidget::getLayer ( int  idx) const

Get a layer handle. This function returns a handle for the idx 'th layer.

Definition at line 1791 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), OptionalContent::getNumOCGs(), OptionalContent::getOCG(), and PDFDoc::getOptionalContent().

◆ getLayerName()

QString XpdfWidget::getLayerName ( XpdfLayerHandle  layer) const

Get the name of a layer. This function returns the title of layer.

Definition at line 1804 of file XpdfWidget.cc.

References name.

Referenced by LayerModel::data().

◆ getLayerOrderChild()

XpdfLayerOrderHandle XpdfWidget::getLayerOrderChild ( XpdfLayerOrderHandle  order,
int  idx 
)

Returns the idx 'th child of a layer display order tree node.

Definition at line 1939 of file XpdfWidget.cc.

Referenced by LayerModel::getOrderRow(), and LayerModel::index().

◆ getLayerOrderIsName()

bool XpdfWidget::getLayerOrderIsName ( XpdfLayerOrderHandle  order) const

Check the type of a layer display order tree node. Returns true if the specified node of the layer display order tree is a name; false if the node is a layer.

Definition at line 1886 of file XpdfWidget.cc.

Referenced by LayerModel::data().

◆ getLayerOrderLayer()

XpdfLayerHandle XpdfWidget::getLayerOrderLayer ( XpdfLayerOrderHandle  order)

Get the layer associated with a layer display order tree node.

Definition at line 1917 of file XpdfWidget.cc.

Referenced by LayerModel::data(), and LayerModel::setData().

◆ getLayerOrderName()

QString XpdfWidget::getLayerOrderName ( XpdfLayerOrderHandle  order) const

Get the name of a layer display order tree node. This should only be called if getLayerOrderIsName returns true.

Definition at line 1897 of file XpdfWidget.cc.

References name.

Referenced by LayerModel::data().

◆ getLayerOrderNumChildren()

int XpdfWidget::getLayerOrderNumChildren ( XpdfLayerOrderHandle  order)

Returns the number of children attached to a layer display order tree node.

Definition at line 1928 of file XpdfWidget.cc.

Referenced by LayerModel::getOrderRow(), LayerModel::index(), and LayerModel::rowCount().

◆ getLayerOrderParent()

XpdfLayerOrderHandle XpdfWidget::getLayerOrderParent ( XpdfLayerOrderHandle  order)

Return the parent of a layer display order tree node. This function returns the parent of node order, or NULL if order is the root node.

Definition at line 1954 of file XpdfWidget.cc.

Referenced by LayerModel::getOrderRow(), and LayerModel::parent().

◆ getLayerOrderRoot()

XpdfLayerOrderHandle XpdfWidget::getLayerOrderRoot ( ) const

Get the root of the layer display order tree.

Definition at line 1874 of file XpdfWidget.cc.

References core, OptionalContent::getDisplayRoot(), PDFCore::getDoc(), and PDFDoc::getOptionalContent().

Referenced by LayerModel::index(), and LayerModel::rowCount().

◆ getLayerPrintState()

int XpdfWidget::getLayerPrintState ( XpdfLayerHandle  layer) const

Get the suggested state for this layer in printing mode. This function returns one of:

  • 1: on
  • 0: off
  • -1: unset

Definition at line 1860 of file XpdfWidget.cc.

References ocUsageOff, and ocUsageOn.

◆ getLayerViewState()

int XpdfWidget::getLayerViewState ( XpdfLayerHandle  layer) const

Get the suggested state for this layer in viewing mode. This function returns one of:

  • 1: on
  • 0: off
  • -1: unset

Definition at line 1846 of file XpdfWidget.cc.

References ocUsageOff, and ocUsageOn.

◆ getLayerVisibility()

bool XpdfWidget::getLayerVisibility ( XpdfLayerHandle  layer) const

Get the visibility state of a layer. Returns true if the layer is currently visible, false if not.

Definition at line 1824 of file XpdfWidget.cc.

Referenced by LayerModel::data(), and LayerModel::setData().

◆ getLinkInfo()

QString XpdfWidget::getLinkInfo ( int  page,
double  xx,
double  yy 
)

Get destination information for the hyperlink at the specified page and coordinates. If there is a link at the specified point, returns a string suitable for displaying to a user; otherwise returns an empty string. Note: This function expects PDF coordinates, not window coordinates.

Definition at line 760 of file XpdfWidget.cc.

References core, PDFCore::findLink(), PDFCore::getDoc(), QtPDFCore::getLinkInfo(), and PDFDoc::getNumPages().

Referenced by XpdfViewer::followLink(), and XpdfViewer::mouseMove().

◆ getLinkTarget()

bool XpdfWidget::getLinkTarget ( int  page,
double  xx,
double  yy,
QString &  targetFileName,
int &  targetPage,
QString &  targetDest 
)
private

◆ getMidPage()

◆ getMouseLinkInfo()

QString XpdfWidget::getMouseLinkInfo ( )

Get destination information for the hyperlink under the mouse. If the mouse is currently over a hyperlink, return an info string (same as with getLinkInfo()); otherwise return an empty string.

Definition at line 779 of file XpdfWidget.cc.

References core, QtPDFCore::getLinkAction(), and QtPDFCore::getLinkInfo().

◆ getNumEmbeddedFiles()

int XpdfWidget::getNumEmbeddedFiles ( )

Return the number of embedded files in the current PDF file.

Definition at line 1966 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), and PDFDoc::getNumEmbeddedFiles().

Referenced by XpdfViewer::fillAttachmentList().

◆ getNumLayers()

int XpdfWidget::getNumLayers ( ) const

Return the number of layers in the PDF file. Note that a PDF file can have zero or more layers.

Definition at line 1780 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), OptionalContent::getNumOCGs(), and PDFDoc::getOptionalContent().

◆ getNumPages()

int XpdfWidget::getNumPages ( ) const

Return the number of pages in the currently open PDF file. Returns -1 if no file is open.

Definition at line 483 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), and PDFDoc::getNumPages().

Referenced by XpdfViewer::cmdGotoPage(), XpdfViewer::execSaveImageDialog(), and XpdfViewer::updateDocInfo().

◆ getOutlineChild()

XpdfOutlineHandle XpdfWidget::getOutlineChild ( XpdfOutlineHandle  outline,
int  idx 
)

Return a child of an outline tree node. This function returns the idx 'th child of node outline, or the idx 'th root entry if outline is NULL.

Definition at line 1693 of file XpdfWidget.cc.

References core, GList::get(), PDFCore::getDoc(), Outline::getItems(), GList::getLength(), and PDFDoc::getOutline().

Referenced by OutlineModel::getItemRow(), and OutlineModel::index().

◆ getOutlineNumChildren()

int XpdfWidget::getOutlineNumChildren ( XpdfOutlineHandle  outline)

Return the number of children of an outline tree node. This function returns the number of children of node outline, or the number of root outline entries if outline is NULL.

Definition at line 1671 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), Outline::getItems(), GList::getLength(), and PDFDoc::getOutline().

Referenced by OutlineModel::getItemRow(), OutlineModel::index(), and OutlineModel::rowCount().

◆ getOutlineParent()

XpdfOutlineHandle XpdfWidget::getOutlineParent ( XpdfOutlineHandle  outline)

Return the parent of an outline tree node. This function returns the parent of node outline, or NULL if outline is a root item.

Definition at line 1719 of file XpdfWidget.cc.

Referenced by OutlineModel::getItemRow(), and OutlineModel::parent().

◆ getOutlineStartsOpen()

bool XpdfWidget::getOutlineStartsOpen ( XpdfOutlineHandle  outline)

Return true if the specified outline entry starts open.

Definition at line 1746 of file XpdfWidget.cc.

Referenced by XpdfViewer::setOutlineOpenItems().

◆ getOutlineTargetPage()

int XpdfWidget::getOutlineTargetPage ( XpdfOutlineHandle  outline)

Return the target page number for the specified outline entry.

Definition at line 1757 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), and PDFDoc::getOutlineTargetPage().

Referenced by OutlineModel::findPageIndex().

◆ getOutlineTitle()

QString XpdfWidget::getOutlineTitle ( XpdfOutlineHandle  outline)

Get the title of an outline tree node. This function returns the title of node outline.

Definition at line 1726 of file XpdfWidget.cc.

Referenced by OutlineModel::data().

◆ getPageBox()

void XpdfWidget::getPageBox ( int  page,
const QString &  box,
double *  xMin,
double *  yMin,
double *  xMax,
double *  yMax 
) const

Return the coordinates of the specified page box.

Parameters
pagethe page number
boxthe requested page box - one of "media", "crop", "bleed", "trim", or "art" (box is not case-sensitive)
*xMinreturns the minimum x coordinate of the box
*yMinreturns the minimum y coordinate of the box
*xMaxreturns the maximum x coordinate of the box
*yMaxreturns the maximum y coordinate of the box

All coordinates are in points (1 point = 1/72 inch).

Definition at line 1031 of file XpdfWidget.cc.

References core, Page::getArtBox(), Page::getBleedBox(), PDFDoc::getCatalog(), Page::getCropBox(), PDFCore::getDoc(), Page::getMediaBox(), PDFDoc::getNumPages(), Catalog::getPage(), Page::getTrimBox(), PDFRectangle::x1, PDFRectangle::x2, PDFRectangle::y1, and PDFRectangle::y2.

◆ getPageHeight()

double XpdfWidget::getPageHeight ( int  page) const

Return the height of the specified page. This function returns the crop box height, measured in points (1 point = 1/72 inch).

Definition at line 1079 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), PDFDoc::getNumPages(), and PDFDoc::getPageCropHeight().

◆ getPageLabelFromPageNum()

QString XpdfWidget::getPageLabelFromPageNum ( int  pageNum)

Convert a page number to a page label. Return the page label for page number pageNum. Returns an empty string if the page number is invalid or if the PDF file doesn't have page labels.

Definition at line 1633 of file XpdfWidget.cc.

References core, PDFDoc::getCatalog(), PDFCore::getDoc(), TextString::getLength(), Catalog::getPageLabel(), TextString::getUnicode(), and u.

Referenced by XpdfViewer::updatePageNumberOrLabel().

◆ getPageNumFromPageLabel()

int XpdfWidget::getPageNumFromPageLabel ( QString  pageLabel)

Convert a page label to a page number. Return the page number for pageLabel. Returns -1 if there is no matching page label or if the PDF file doesn't have page labels.

Definition at line 1654 of file XpdfWidget.cc.

References TextString::append(), core, PDFDoc::getCatalog(), PDFCore::getDoc(), and Catalog::getPageNumFromPageLabel().

Referenced by XpdfViewer::pageNumberChanged().

◆ getPageRotation()

int XpdfWidget::getPageRotation ( int  page) const

Get the default rotation for the specified page. This is the default viewing rotation specified in the PDF file - it will be one of 0, 90, 180, or 270.

Definition at line 1093 of file XpdfWidget.cc.

References core, PDFDoc::getCatalog(), PDFCore::getDoc(), PDFDoc::getNumPages(), Catalog::getPage(), and Page::getRotate().

◆ getPageWidth()

double XpdfWidget::getPageWidth ( int  page) const

Return the width of the specified page. This function returns the crop box width, measured in points (1 point = 1/72 inch).

Definition at line 1065 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), PDFDoc::getNumPages(), and PDFDoc::getPageCropWidth().

◆ getRotate()

int XpdfWidget::getRotate ( ) const

Return the current page rotation. The angle can be 0, 90, 180, or 270.

Definition at line 687 of file XpdfWidget.cc.

References core, and PDFCore::getRotate().

Referenced by XpdfViewer::cmdRotateCCW(), XpdfViewer::cmdRotateCW(), and XpdfViewer::cmdSaveTabState().

◆ getScrollX()

int XpdfWidget::getScrollX ( ) const

Return the current scroll position x coordinate.

Definition at line 606 of file XpdfWidget.cc.

References core, and PDFCore::getScrollX().

Referenced by XpdfViewer::cmdSaveTabState().

◆ getScrollY()

int XpdfWidget::getScrollY ( ) const

Return the current scroll position y coordinate.

Definition at line 614 of file XpdfWidget.cc.

References core, and PDFCore::getScrollY().

Referenced by XpdfViewer::cmdSaveTabState().

◆ getSelectedText()

QString XpdfWidget::getSelectedText ( )

Get the currently selected text. Returns an empty string if there is no selection (or if there is no text in the selected region).

Definition at line 1551 of file XpdfWidget.cc.

References core, and QtPDFCore::getSelectedTextQString().

◆ getThumbnail()

QImage XpdfWidget::getThumbnail ( int  page)

Retrieve an embedded thumbnail image. This function returns the embedded thumbnail image for the specified page, or a null image if there is no embedded thumbnail. This function does not do any rasterization – it only returns a non-null image if there is an embedded thumbnail in the PDF file.

Definition at line 1420 of file XpdfWidget.cc.

References core, Object::free(), PDFDoc::getCatalog(), PDFCore::getDoc(), Object::getInt(), ImageStream::getLine(), GfxColorSpace::getNComps(), PDFDoc::getNumPages(), Catalog::getPage(), GfxImageColorMap::getRGBByteLine(), Object::getStream(), Page::getThumbnail(), gfree(), gfxRenderingIntentPerceptual, gmallocn(), Object::isInt(), Object::isStream(), Dict::lookup(), GfxColorSpace::parse(), ImageStream::reset(), and Object::streamGetDict().

◆ getZoom()

double XpdfWidget::getZoom ( ) const

Return the current zoom factor. This can be a percentage factor or one of the special values, XpdfWidget::zoomToPage or XpdfWidget::zoomToWidth.

Definition at line 629 of file XpdfWidget.cc.

References core, and PDFCore::getZoom().

Referenced by XpdfViewer::cmdSaveTabState(), XpdfViewer::enterFullScreenMode(), and XpdfViewer::updateZoomInfo().

◆ getZoomPercent()

double XpdfWidget::getZoomPercent ( int  page = 1) const

Return the current zoom factor as a percentage. If the zoom is set to XpdfWidget::zoomToPage or XpdfWidget::zoomToWidth, returns the computed zoom percentage for the specified page, based on the current window size.

Definition at line 637 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), PDFDoc::getNumPages(), PDFCore::getZoom(), PDFCore::getZoomDPI(), and zoom.

Referenced by XpdfViewer::cmdZoomIn(), XpdfViewer::cmdZoomOut(), XpdfViewer::cmdZoomToSelection(), XpdfViewer::execSaveImageDialog(), and XpdfViewer::updateZoomInfo().

◆ goBackward()

void XpdfWidget::goBackward ( )

Go backward along the history list.

Definition at line 571 of file XpdfWidget.cc.

References core, and PDFCore::goBackward().

Referenced by XpdfViewer::cmdGoBackward().

◆ goForward()

void XpdfWidget::goForward ( )

Go forward along the history list.

Definition at line 564 of file XpdfWidget.cc.

References core, and PDFCore::goForward().

Referenced by XpdfViewer::cmdGoForward().

◆ gotoFirstPage()

void XpdfWidget::gotoFirstPage ( )

Display the first page. This is equivalent to

void gotoPage(int pageNum)
Display the specified page.
Definition: XpdfWidget.cc:510

Definition at line 517 of file XpdfWidget.cc.

References core, PDFCore::displayPage(), gFalse, and gTrue.

◆ gotoLastPage()

void XpdfWidget::gotoLastPage ( )

Display the last page. This is equivalent to

int getNumPages() const
Definition: XpdfWidget.cc:483

Definition at line 524 of file XpdfWidget.cc.

References core, PDFCore::displayPage(), PDFCore::getDoc(), PDFDoc::getNumPages(), gFalse, and gTrue.

Referenced by XpdfViewer::cmdGotoLastPage().

◆ gotoLinkAt()

bool XpdfWidget::gotoLinkAt ( int  page,
double  xx,
double  yy 
)

Activate the link (if any) at the specified page and coordinates. Returns true if successful. Note: This function expects PDF coordinates, not window coordinates.

Definition at line 790 of file XpdfWidget.cc.

References core, QtPDFCore::doAction(), PDFCore::findLink(), PDFCore::getDoc(), and PDFDoc::getNumPages().

Referenced by XpdfViewer::followLink().

◆ gotoNamedDestination()

bool XpdfWidget::gotoNamedDestination ( const QString &  dest)

Go to a named destination.

Definition at line 548 of file XpdfWidget.cc.

References core, and PDFCore::gotoNamedDestination().

Referenced by XpdfViewer::checkOpen(), XpdfViewer::cmdGotoDest(), and XpdfViewer::open().

◆ gotoNextPage()

void XpdfWidget::gotoNextPage ( bool  scrollToTop = true)

Display the next page.

Definition at line 534 of file XpdfWidget.cc.

References core, and PDFCore::gotoNextPage().

Referenced by XpdfViewer::cmdNextPage(), and XpdfViewer::cmdNextPageNoScroll().

◆ gotoOutlineTarget()

void XpdfWidget::gotoOutlineTarget ( XpdfOutlineHandle  outline)

Jump to the target of the specified outline entry.

Definition at line 1768 of file XpdfWidget.cc.

References core, and QtPDFCore::doAction().

Referenced by XpdfViewer::outlineItemClicked().

◆ gotoPage()

void XpdfWidget::gotoPage ( int  pageNum)

Display the specified page.

Definition at line 510 of file XpdfWidget.cc.

References core, PDFCore::displayPage(), gFalse, and gTrue.

Referenced by XpdfViewer::checkOpen(), XpdfViewer::cmdGotoPage(), and XpdfViewer::open().

◆ gotoPreviousPage()

void XpdfWidget::gotoPreviousPage ( bool  scrollToTop = true)

Display the previous page.

Definition at line 541 of file XpdfWidget.cc.

References core, gFalse, and PDFCore::gotoPrevPage().

Referenced by XpdfViewer::cmdPrevPage(), and XpdfViewer::cmdPrevPageNoScroll().

◆ hasOpenDocument()

bool XpdfWidget::hasOpenDocument ( ) const

◆ hasPageLabels()

bool XpdfWidget::hasPageLabels ( )

Check if the PDF file has page labels. Return true if the currently open PDF file has page labels.

Definition at line 1622 of file XpdfWidget.cc.

References core, PDFDoc::getCatalog(), PDFCore::getDoc(), and Catalog::hasPageLabels().

Referenced by XpdfViewer::pageNumberChanged().

◆ hasSelection()

bool XpdfWidget::hasSelection ( )

Check to see if there is a selection. Returns true if there is a currently active selection.

Definition at line 1107 of file XpdfWidget.cc.

References core, and PDFCore::hasSelection().

Referenced by XpdfViewer::execSaveImageDialog(), and XpdfViewer::followLink().

◆ init()

void XpdfWidget::init ( const QString &  configFileName = QString())
static

Initialize the XpdfWidget class, reading a configuration file. If configFileName is non-empty, the specified file is tried first. If configFileName is empty, or the file doesn't exist, the default location is tried (<exe-dir>/xpdfrc on Windows; ~/.xpdfrc on Unix).

This function must be called before any other XpdfWidget functions (including the constructor). It will be called automatically (with a NULL configFileName) if it hasn't already been called when the first XpdfWidget function is used.

Definition at line 141 of file XpdfWidget.cc.

References appendToPath(), GString::copy(), GString::getCString(), globalParams, grabPath(), gTrue, initMutex, GlobalParams::setBaseDir(), GlobalParams::setErrQuiet(), GlobalParams::setupBaseFonts(), and xpdfSysConfigFile.

Referenced by setConfig(), setTextEncoding(), and setup().

◆ isBlockSelectMode()

bool XpdfWidget::isBlockSelectMode ( )

Check for block selection mode. Returns true if the current selection mode is block.

Definition at line 1149 of file XpdfWidget.cc.

References core, PDFCore::getSelectMode(), and selectModeBlock.

Referenced by XpdfViewer::cmdToggleSelectMode(), and XpdfViewer::updateSelectModeInfo().

◆ isLinearSelectMode()

bool XpdfWidget::isLinearSelectMode ( )

Check for linear selection mode. Returns true if the current selection mode is linear.

Definition at line 1157 of file XpdfWidget.cc.

References core, PDFCore::getSelectMode(), and selectModeLinear.

◆ keyPress

void XpdfWidget::keyPress ( QKeyEvent *  e)
signal

This signal is emitted whenever a key is pressed.

◆ linkCbk()

void XpdfWidget::linkCbk ( void *  data,
const char *  type,
const char *  dest,
int  page 
)
staticprivate

Definition at line 2055 of file XpdfWidget.cc.

References linkClick().

Referenced by setup().

◆ linkClick

void XpdfWidget::linkClick ( const QString &  linkType,
const QString &  dest,
int  page 
)
signal

This signal is emitted whenever the user clicks on a hyperlink.

Parameters
linkTypethe type of link - one of:
  • "goto": a link to another page in the same PDF file - dest is empty; page is the destination page number
  • "pdf": a link to another PDF file - dest is the target PDF file; page is 0
  • "launch": an arbitrary command to be run - dest is the command; page is 0
  • "url": a URL link - dest is the URL; page is 0
  • "named": a "named action" link - dest is the action (see the PDF spec for details); page is 0
  • "unknown": an unknown link type - dest is empty; page is 0
destdestination string
pagedestination page number

Referenced by linkCbk().

◆ loadDoc()

XpdfWidget::ErrorCode XpdfWidget::loadDoc ( XpdfDocHandle  doc)

Load a PDF document and display its first page. This function displays a PDF document handle created by XpdfWidget::readDoc. The document handle should not be used for anything else after calling this function.

Returns
pdfOk if successful; an error code, otherwise

Definition at line 410 of file XpdfWidget.cc.

References core, PDFCore::displayPage(), doc, gFalse, gTrue, QtPDFCore::loadDoc(), pdfErrNoHandle, and pdfOk.

◆ loadFile()

XpdfWidget::ErrorCode XpdfWidget::loadFile ( const QString &  fileName,
const QString &  password = "" 
)

Load a PDF file and display its first page.

Parameters
fileNamethe PDF file to load
passworda string to be tried first as the owner password and then as the user password
Returns
pdfOk if successful; an error code, otherwise

Definition at line 287 of file XpdfWidget.cc.

References core, PDFCore::displayPage(), gFalse, gfree(), gmallocn(), gTrue, QtPDFCore::loadFile(), and pdfErrOutOfMemory.

Referenced by XpdfViewer::checkOpen(), and XpdfViewer::open().

◆ loadMem()

XpdfWidget::ErrorCode XpdfWidget::loadMem ( const char *  buffer,
unsigned int  bufferLength,
const QString &  password = "" 
)

Load a PDF file from a memory buffer and display its first page.

Parameters
bufferthe PDF file in memory
bufferLengthlength of buffer
passworda string to be tried first as the owner password and then as the user password
Returns
pdfOk if successful; an error code otherwise

Definition at line 331 of file XpdfWidget.cc.

References core, PDFCore::displayPage(), gFalse, gTrue, Object::initNull(), QtPDFCore::loadFile(), and pdfErrOutOfMemory.

◆ midPageChange

void XpdfWidget::midPageChange ( int  pageNum)
signal

This signal is emitted whenever the page shown at the middle of the window changes. It is similar to XpdfWidget::pageChange, except that it reflects the page shown at the middle of the window (instead of the page at the top of the window).

Referenced by midPageChangedCbk().

◆ midPageChangedCbk()

void XpdfWidget::midPageChangedCbk ( void *  data,
int  pageNum 
)
staticprivate

Definition at line 2037 of file XpdfWidget.cc.

References midPageChange().

Referenced by setup().

◆ mouseClick

void XpdfWidget::mouseClick ( QMouseEvent *  e)
signal

This signal is emitted whenever a mouse button is clicked. A click is defined as a button press and release within a short distance of each other (a few pixels). The sequence of signals is: mousePress, possibly a few mouseMoves, mouseRelease, and then mouseClick.

◆ mouseDoubleClick

void XpdfWidget::mouseDoubleClick ( QMouseEvent *  e)
signal

This signal is emitted whenever a mouse button is double-clicked. Double clicks are two clicks within a few pixels of each other, and within a certain time of each other. The sequence of signals is: mousePress, mouseRelease, mouseClick, mousePress, mouseRelease, mouseDoubleClick. There may also be mouseMoves between the presses and releases.

◆ mouseMove

void XpdfWidget::mouseMove ( QMouseEvent *  e)
signal

This signal is emitted whenever the mouse pointer is moved.

◆ mouseOverLink()

bool XpdfWidget::mouseOverLink ( )

Returns true if the mouse is currently over a hyperlink.

Definition at line 726 of file XpdfWidget.cc.

References convertWindowToPDFCoords(), core, PDFCore::findLink(), QtPDFCore::getHyperlinksEnabled(), and QtPDFCore::getLinkAction().

Referenced by XpdfViewer::getContext().

◆ mousePress

void XpdfWidget::mousePress ( QMouseEvent *  e)
signal

This signal is emitted whenever a mouse button is pressed.

◆ mouseRelease

void XpdfWidget::mouseRelease ( QMouseEvent *  e)
signal

This signal is emitted whenever a mouse button is released.

◆ mouseTripleClick

void XpdfWidget::mouseTripleClick ( QMouseEvent *  e)
signal

This signal is emitted whenever a mouse button is triple-clicked. Triple clicks are three clicks within a few pixels of each other, and within a certain time of each other. The sequence of signals is: mousePress, mouseRelease, mouseClick, mousePress, mouseRelease, mouseDoubleClick, mousePress, mouseRelease, mouseTripleClick. There may also be mouseMoves between the presses and releases.

◆ mouseWheel

void XpdfWidget::mouseWheel ( QWheelEvent *  e)
signal

This signal is emitted whenever a mouse wheel is clicked.

◆ okToExtractText()

bool XpdfWidget::okToExtractText ( ) const

Checks to see if text extraction is allowed. This function returns false if the currently displayed PDF file is encrypted and does not allow extraction of text (or if no PDF file is currently open). The owner password can be used to circumvent this: if a valid owner password was supplied to XpdfWidget::loadFile, this function will always return true. If this function returns false, the text extraction functions will not return any text.

Definition at line 1500 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), and PDFDoc::okToCopy().

Referenced by XpdfViewer::cmdCopy().

◆ onAnnot()

XpdfAnnotHandle XpdfWidget::onAnnot ( int  page,
double  xx,
double  yy 
)

Check for an annotation containing the specified point. Returns NULL if there is no annotation at this point. Note: This function expects PDF coordinates, not window coordinates.

Definition at line 902 of file XpdfWidget.cc.

References core, PDFCore::findAnnot(), and PDFCore::getDoc().

◆ onFormField()

XpdfFormFieldHandle XpdfWidget::onFormField ( int  page,
double  xx,
double  yy 
)

Check for a form field containing the specified point. Returns NULL if there is no annotation at this point. Note: This function expects PDF coordinates, not window coordinates.

Definition at line 946 of file XpdfWidget.cc.

References core, PDFCore::findFormField(), and PDFCore::getDoc().

◆ onLink()

bool XpdfWidget::onLink ( int  page,
double  xx,
double  yy 
)

Returns true if the specified coordinates are inside a hyperlink. Note: This function expects PDF coordinates, not window coordinates.

Definition at line 746 of file XpdfWidget.cc.

References core, PDFCore::findLink(), PDFCore::getDoc(), and PDFDoc::getNumPages().

◆ pageChange

void XpdfWidget::pageChange ( int  pageNum)
signal

This signal is emitted whenever the viewer displays a new page. It can be triggered by user actions (e.g., the PageDown button), or program control (e.g., the gotoNextPage function).

Parameters
pageNum- the new page number

Referenced by updateCbk().

◆ paintDone

void XpdfWidget::paintDone ( bool  finished)
signal

This signal is emitted whenever the widget is repainted. finished is true if the painted view is complete, or false if this was an incremental update, i.e., if the view is still being rendered.

Referenced by paintDoneCbk().

◆ paintDoneCbk()

void XpdfWidget::paintDoneCbk ( void *  data,
bool  finished 
)
staticprivate

Definition at line 2068 of file XpdfWidget.cc.

References paintDone().

Referenced by setup().

◆ postLoad

void XpdfWidget::postLoad ( )
signal

This signal is emitted just after a PDF file is loaded.

Referenced by postLoadCbk().

◆ postLoadCbk()

void XpdfWidget::postLoadCbk ( void *  data)
staticprivate

Definition at line 2049 of file XpdfWidget.cc.

References postLoad().

Referenced by setup().

◆ preLoad

void XpdfWidget::preLoad ( )
signal

This signal is emitted just before a PDF file is loaded.

Referenced by preLoadCbk().

◆ preLoadCbk()

void XpdfWidget::preLoadCbk ( void *  data)
staticprivate

Definition at line 2043 of file XpdfWidget.cc.

References preLoad().

Referenced by setup().

◆ readDoc()

XpdfWidget::ErrorCode XpdfWidget::readDoc ( XpdfDocHandle docPtr,
const QString &  fileName,
const QString &  password = "" 
)

Load a PDF file and return a handle.

This function can be safely called from a non-GUI thread. Use XpdfWidget::loadDoc (on the GUI thread) to load the document handle into the viewer. The handle returned in *docPtr should be passed to either XpdfWidget::loadDoc or XpdfWidget::freeDoc.

Calling XpdfWidget::readDoc + XpdfWidget::loadDoc is equivalent to calling XpdfWidget::loadFile. The difference is that readDoc can be called on a background thread to avoid stalling the user interface.

Parameters
docPtrthe PDF document handle will be returned her
fileNamethe PDF file to load
passworda string to be tried first as the owner password and then as the user password
Returns
pdfOk if successful; an error code, otherwise

Definition at line 360 of file XpdfWidget.cc.

References core, doc, PDFDoc::getErrorCode(), gfree(), gmallocn(), PDFDoc::isOk(), pdfErrOutOfMemory, and pdfOk.

◆ reload()

XpdfWidget::ErrorCode XpdfWidget::reload ( )

Reload the current PDF file. This reloads the current PDF file, maintaining the zoom and scroll position (if possible). This only works if the PDF file was loaded from a file (i.e., with XpdfWidget::loadFile, not with XpdfWidget::loadMem).

Returns
pdfOk if successful; an error code otherwise

Definition at line 426 of file XpdfWidget.cc.

References core, pdfErrOutOfMemory, and QtPDFCore::reload().

Referenced by XpdfViewer::cmdReload().

◆ resized

void XpdfWidget::resized ( )
signal

This signal is emitted when the widget is resized.

◆ saveAs()

XpdfWidget::ErrorCode XpdfWidget::saveAs ( const QString &  fileName)

Save the PDF file with another name.

Parameters
fileNamethe file to be written
Returns
pdfOk if successful; an error code otherwise

Definition at line 441 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), pdfErrNoHandle, pdfErrOpenFile, pdfErrOutOfMemory, pdfOk, and PDFDoc::saveAs().

Referenced by XpdfViewer::cmdSaveAs().

◆ saveEmbeddedFile()

bool XpdfWidget::saveEmbeddedFile ( int  idx,
QString  fileName 
)

Save the idx 'th embedded file with the specified file name. Returns true if successful.

Definition at line 1999 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), PDFDoc::getNumEmbeddedFiles(), and PDFDoc::saveEmbeddedFile().

Referenced by XpdfViewer::attachmentSaveClicked().

◆ scrollBy()

void XpdfWidget::scrollBy ( int  dx,
int  dy 
)

Scroll the page by (dx,dy) pixels. If dx is positive, scrolls right; if dx is negative, scrolls left. Similarly, positive and negative values of dy scroll down and up, respectively.

Definition at line 599 of file XpdfWidget.cc.

References core, PDFCore::getScrollX(), PDFCore::getScrollY(), and PDFCore::scrollTo().

Referenced by XpdfViewer::cmdScrollDown(), XpdfViewer::cmdScrollLeft(), XpdfViewer::cmdScrollRight(), and XpdfViewer::cmdScrollUp().

◆ scrollPageDown()

void XpdfWidget::scrollPageDown ( )

Scroll one screen down.

Definition at line 585 of file XpdfWidget.cc.

References core, and PDFCore::scrollPageDown().

Referenced by XpdfViewer::cmdPageDown().

◆ scrollPageUp()

void XpdfWidget::scrollPageUp ( )

Scroll one screen up.

Definition at line 578 of file XpdfWidget.cc.

References core, and PDFCore::scrollPageUp().

Referenced by XpdfViewer::cmdPageUp().

◆ scrollTo()

void XpdfWidget::scrollTo ( int  xx,
int  yy 
)

Scroll the page so that the top-left corner of the window is (xx,yy) pixels from the top-left corner of the PDF page.

Definition at line 592 of file XpdfWidget.cc.

References core, and PDFCore::scrollTo().

Referenced by XpdfViewer::cmdLoadTabState().

◆ selectDone

void XpdfWidget::selectDone ( )
signal

This signal is emitted when the user selects an area. Use XpdfWidget::getCurrentSelection to retrieve the selection.

Referenced by selectDoneCbk().

◆ selectDoneCbk()

void XpdfWidget::selectDoneCbk ( void *  data)
staticprivate

Definition at line 2062 of file XpdfWidget.cc.

References selectDone().

Referenced by setup().

◆ setBlockSelectMode()

void XpdfWidget::setBlockSelectMode ( )

Set block selection mode. In this mode, the selection is a simple rectangle. Any part of the page can be selected, regardless of the content on the page.

Definition at line 1165 of file XpdfWidget.cc.

References core, selectModeBlock, and PDFCore::setSelectMode().

Referenced by XpdfViewer::addTab(), XpdfViewer::cmdBlockSelectMode(), and XpdfViewer::cmdToggleSelectMode().

◆ setConfig()

void XpdfWidget::setConfig ( const QString &  command)
static

Process a configuration command, i.e., one line of an xpdfrc file. Note that this applies globally to all XpdfWidget instances.

Definition at line 194 of file XpdfWidget.cc.

References globalParams, init(), and GlobalParams::parseLine().

◆ setContinuousMode()

void XpdfWidget::setContinuousMode ( bool  continuous)

Set continuous or single-page view mode. Deprecated: this is equivalent to calling setDisplayMode() with pdfDisplaySingle or pdfDisplayContinuous.

Parameters
continuoustrue for continous view mode, false for single-page view mode

Definition at line 695 of file XpdfWidget.cc.

References core, displayContinuous, displaySingle, and PDFCore::setDisplayMode().

◆ setCurrentSelection()

void XpdfWidget::setCurrentSelection ( int  page,
double  x0,
double  y0,
double  x1,
double  y1 
)

Set the selection. Sets the current selection to the rectangle with upper-left corner (x0,y0) and lower-right corner (x1,y1) on page.

Definition at line 1124 of file XpdfWidget.cc.

References core, PDFCore::cvtUserToDev(), and PDFCore::setSelection().

Referenced by XpdfViewer::cmdSetSelection().

◆ setCursor()

void XpdfWidget::setCursor ( const QCursor &  cursor)

Set the cursor. The requested cursor will only be displayed in the viewport (not in the scrollbars).

Definition at line 279 of file XpdfWidget.cc.

References core, and QtPDFCore::doSetCursor().

Referenced by XpdfViewer::mouseMove().

◆ setDisplayMode()

◆ setKeyPassthrough()

void XpdfWidget::setKeyPassthrough ( bool  on)
inline

Control keypress passthrough. If enabled, XpdfWidget will pass keypress events through to the keyPress signal, with no other processing. If disabled, XpdfWidget will implement some built-in key bindings. The default is disabled.

Definition at line 229 of file XpdfWidget.h.

References keyPassthrough.

Referenced by XpdfViewer::addTab().

◆ setLayerVisibility()

void XpdfWidget::setLayerVisibility ( XpdfLayerHandle  layer,
bool  visibility 
)

Set the visibility state of a layer.

Parameters
layerthe layer handle
visibilitythe new state - true for visible, false for not visible

Definition at line 1835 of file XpdfWidget.cc.

References core, PDFCore::getDoc(), and PDFCore::setOCGState().

Referenced by LayerModel::setData().

◆ setLinearSelectMode()

void XpdfWidget::setLinearSelectMode ( )

Set linear selection mode. In this mode, the selection follows text. Non-text regions cannot be selected.

Definition at line 1172 of file XpdfWidget.cc.

References core, selectModeLinear, and PDFCore::setSelectMode().

Referenced by XpdfViewer::addTab(), XpdfViewer::cmdLinearSelectMode(), and XpdfViewer::cmdToggleSelectMode().

◆ setMatteColor()

void XpdfWidget::setMatteColor ( const QColor &  matteColor)

Set the matte color, i.e., the color used for background outside the actual page area. The default is a medium gray.

Definition at line 260 of file XpdfWidget.cc.

References core, and PDFCore::setMatteColor().

Referenced by XpdfViewer::enterFullScreenMode(), and XpdfViewer::exitFullScreenMode().

◆ setMousePassthrough()

void XpdfWidget::setMousePassthrough ( bool  on)
inline

Control mouse event passthrough. If enabled, XpdfWidget will pass mouse events through to the mousePress/mouseRelease signals, with no other processing. If disabled, XpdfWidget will implement some built-in mouse handling (in addition to sending the signals). The default is disabled.

Definition at line 236 of file XpdfWidget.h.

References mousePassthrough.

Referenced by XpdfViewer::addTab().

◆ setReverseVideo()

void XpdfWidget::setReverseVideo ( bool  reverse)

Turn reverse video mode on/off. The default is off.

Definition at line 272 of file XpdfWidget.cc.

References core, and PDFCore::setReverseVideo().

◆ setRotate()

void XpdfWidget::setRotate ( int  rotate)

Change the page rotation.

Parameters
rotaterotation angle in degrees - must be 0, 90, 180, or 270

Definition at line 677 of file XpdfWidget.cc.

References core, rotate, and PDFCore::setRotate().

Referenced by XpdfViewer::cmdLoadTabState(), XpdfViewer::cmdRotateCCW(), XpdfViewer::cmdRotateCW(), and XpdfViewer::open().

◆ setSelectionColor()

void XpdfWidget::setSelectionColor ( const QColor &  selectionColor)

Set the selection color.

Definition at line 1179 of file XpdfWidget.cc.

References core, and PDFCore::setSelectionColor().

Referenced by XpdfViewer::addTab().

◆ setTextEncoding()

void XpdfWidget::setTextEncoding ( const QString &  encodingName)

Set the encoding to use for text extraction. The following encodings are predefined:

  • "Latin1": ISO-8859-1 (this is the default value)
  • "ASCII7": 7-bit ASCII
  • "UTF-8": Unicode in UTF-8 format
  • "UCS-2": Unicode in UCS-2 format

Additional encodings can be defined via the xpdfrc config file.

Definition at line 1511 of file XpdfWidget.cc.

References globalParams, init(), and GlobalParams::setTextEncoding().

◆ setup()

◆ setZoom()

void XpdfWidget::setZoom ( double  zoom)

Change the zoom factor. This can be a percentage factor (where 100 means 72 dpi) or one of the special values, XpdfWidget::zoomToPage or XpdfWidget::zoomToWidth.

Definition at line 622 of file XpdfWidget.cc.

References core, PDFCore::setZoom(), and zoom.

Referenced by XpdfViewer::cmdLoadTabState(), XpdfViewer::enterFullScreenMode(), and XpdfViewer::exitFullScreenMode().

◆ showPasswordDialog()

void XpdfWidget::showPasswordDialog ( bool  showDlg)

Control the password dialog. If enabled, the viewer will show a password dialog for encrypted files; if disabled, it will simply return pdfErrEncrypted unless the correct password is passed to pdfLoadFileWithPassword. The default is enabled.

Definition at line 253 of file XpdfWidget.cc.

References core, and QtPDFCore::setShowPasswordDialog().

◆ tick

void XpdfWidget::tick ( )
privateslot

Definition at line 2254 of file XpdfWidget.cc.

References core, and QtPDFCore::tick().

Referenced by setup().

◆ tileDoneCbk()

void XpdfWidget::tileDoneCbk ( void *  data)
staticprivate

Definition at line 2075 of file XpdfWidget.cc.

Referenced by setup().

◆ unsetCursor()

void XpdfWidget::unsetCursor ( )

Reset to the default cursor.

Definition at line 283 of file XpdfWidget.cc.

References core, and QtPDFCore::doUnsetCursor().

Referenced by XpdfViewer::mouseMove(), and XpdfViewer::updateDocInfo().

◆ updateCbk()

void XpdfWidget::updateCbk ( void *  data,
GString fileName,
int  pageNum,
int  numPages,
const char *  linkLabel 
)
staticprivate

Definition at line 2025 of file XpdfWidget.cc.

References pageChange().

Referenced by setup().

◆ zoomCentered()

void XpdfWidget::zoomCentered ( double  zoom)

Set the zoom factor, while maintaining the current center. Accepts the same zoom values as XpdfWidget::setZoom.

Definition at line 663 of file XpdfWidget.cc.

References core, zoom, and PDFCore::zoomCentered().

Referenced by XpdfViewer::cmdZoomFitPage(), XpdfViewer::cmdZoomFitWidth(), XpdfViewer::cmdZoomIn(), XpdfViewer::cmdZoomOut(), and XpdfViewer::cmdZoomPercent().

◆ zoomToCurrentWidth()

void XpdfWidget::zoomToCurrentWidth ( )

Zoom so that the current page(s) fill the window width. Maintains the vertical center.

Definition at line 670 of file XpdfWidget.cc.

References core, and PDFCore::zoomToCurrentWidth().

◆ zoomToRect()

void XpdfWidget::zoomToRect ( int  page,
double  xMin,
double  yMin,
double  xMax,
double  yMax 
)

Zoom in to the specified rectangle. The coordinate system is the same one used by XpdfWidget::getCurrentSelection. This function will set the zoom factor and scroll position so that the specified rectangle just fits in the window.

Definition at line 655 of file XpdfWidget.cc.

References core, and PDFCore::zoomToRect().

Referenced by XpdfViewer::cmdZoomToSelection().

Friends And Related Function Documentation

◆ XpdfViewer

friend class XpdfViewer
friend

Definition at line 999 of file XpdfWidget.h.

Member Data Documentation

◆ core

QtPDFCore* XpdfWidget::core
private

Definition at line 1013 of file XpdfWidget.h.

Referenced by clearSelection(), closeFile(), convertPageToImage(), convertPDFToWindowCoords(), convertRegionToImage(), convertWindowToPDFCoords(), copySelection(), enableExternalHyperlinks(), enableHyperlinks(), enablePan(), enableSelect(), extractText(), find(), findAll(), forceRedraw(), getContinuousMode(), getCurrentPage(), getCurrentSelection(), getDisplayMode(), getEmbeddedFileName(), getFileName(), getLayer(), getLayerOrderRoot(), getLinkInfo(), getLinkTarget(), getMidPage(), getMouseLinkInfo(), getNumEmbeddedFiles(), getNumLayers(), getNumPages(), getOutlineChild(), getOutlineNumChildren(), getOutlineTargetPage(), getPageBox(), getPageHeight(), getPageLabelFromPageNum(), getPageNumFromPageLabel(), getPageRotation(), getPageWidth(), getRotate(), getScrollX(), getScrollY(), getSelectedText(), getThumbnail(), getZoom(), getZoomPercent(), goBackward(), goForward(), gotoFirstPage(), gotoLastPage(), gotoLinkAt(), gotoNamedDestination(), gotoNextPage(), gotoOutlineTarget(), gotoPage(), gotoPreviousPage(), hasOpenDocument(), hasPageLabels(), hasSelection(), isBlockSelectMode(), isLinearSelectMode(), loadDoc(), loadFile(), loadMem(), mouseOverLink(), okToExtractText(), onAnnot(), onFormField(), onLink(), readDoc(), reload(), saveAs(), saveEmbeddedFile(), scrollBy(), scrollPageDown(), scrollPageUp(), scrollTo(), setBlockSelectMode(), setContinuousMode(), setCurrentSelection(), setCursor(), setDisplayMode(), setLayerVisibility(), setLinearSelectMode(), setMatteColor(), setReverseVideo(), setRotate(), setSelectionColor(), setup(), setZoom(), showPasswordDialog(), tick(), unsetCursor(), zoomCentered(), zoomToCurrentWidth(), zoomToRect(), and ~XpdfWidget().

◆ findBackward

const int XpdfWidget::findBackward = 0x00000001
static

search backward from the starting point

Definition at line 133 of file XpdfWidget.h.

Referenced by XpdfViewer::cmdFindPrevious(), and find().

◆ findCaseSensitive

const int XpdfWidget::findCaseSensitive = 0x00000002
static

perform a case-sensitive search (default is case-insensitive)

Definition at line 135 of file XpdfWidget.h.

Referenced by XpdfViewer::cmdFindFirst(), XpdfViewer::cmdFindNext(), XpdfViewer::cmdFindPrevious(), find(), and findAll().

◆ findNext

const int XpdfWidget::findNext = 0x00000004
static

start searching from the previous search result

Definition at line 137 of file XpdfWidget.h.

Referenced by XpdfViewer::cmdFindNext(), XpdfViewer::cmdFindPrevious(), and find().

◆ findOnePageOnly

const int XpdfWidget::findOnePageOnly = 0x00000008
static

limit the search to the current page

Definition at line 139 of file XpdfWidget.h.

Referenced by find().

◆ findWholeWord

const int XpdfWidget::findWholeWord = 0x00000010
static

limit the search to whole words

Definition at line 141 of file XpdfWidget.h.

Referenced by XpdfViewer::cmdFindFirst(), XpdfViewer::cmdFindNext(), XpdfViewer::cmdFindPrevious(), find(), and findAll().

◆ initMutex

QMutex XpdfWidget::initMutex
staticprivate

Definition at line 1011 of file XpdfWidget.h.

Referenced by init().

◆ keyPassthrough

bool XpdfWidget::keyPassthrough
private

Definition at line 1016 of file XpdfWidget.h.

Referenced by setKeyPassthrough(), and setup().

◆ lastMouseEventWasPress

bool XpdfWidget::lastMouseEventWasPress
private

Definition at line 1020 of file XpdfWidget.h.

Referenced by setup().

◆ lastMousePressTime

ulong XpdfWidget::lastMousePressTime[3]
private

Definition at line 1019 of file XpdfWidget.h.

Referenced by setup().

◆ lastMousePressX

int XpdfWidget::lastMousePressX[3]
private

Definition at line 1018 of file XpdfWidget.h.

Referenced by setup().

◆ lastMousePressY

int XpdfWidget::lastMousePressY[3]
private

Definition at line 1018 of file XpdfWidget.h.

Referenced by setup().

◆ mousePassthrough

bool XpdfWidget::mousePassthrough
private

Definition at line 1017 of file XpdfWidget.h.

Referenced by setMousePassthrough(), and setup().

◆ pinchZoomStart

double XpdfWidget::pinchZoomStart
private

Definition at line 1024 of file XpdfWidget.h.

Referenced by setup().

◆ scaleFactor

double XpdfWidget::scaleFactor
private

Definition at line 1014 of file XpdfWidget.h.

Referenced by setup().

◆ tickTimer

QTimer* XpdfWidget::tickTimer
private

Definition at line 1026 of file XpdfWidget.h.

Referenced by setup(), and ~XpdfWidget().

◆ touchPanEnabled

bool XpdfWidget::touchPanEnabled
private

Definition at line 1022 of file XpdfWidget.h.

Referenced by enableTouchPan(), and setup().

◆ touchZoomEnabled

bool XpdfWidget::touchZoomEnabled
private

Definition at line 1023 of file XpdfWidget.h.

Referenced by enableTouchZoom(), and setup().

◆ zoomToHeight

const int XpdfWidget::zoomToHeight = -3
static

zoom to fit page height

Definition at line 126 of file XpdfWidget.h.

◆ zoomToPage

const int XpdfWidget::zoomToPage = -1
static

zoom to fit whole page

Definition at line 124 of file XpdfWidget.h.

Referenced by XpdfViewer::cmdZoomFitPage(), XpdfViewer::enterFullScreenMode(), and XpdfViewer::updateZoomInfo().

◆ zoomToWidth

const int XpdfWidget::zoomToWidth = -2
static

zoom to fit page width

Definition at line 125 of file XpdfWidget.h.

Referenced by XpdfViewer::cmdZoomFitWidth(), and XpdfViewer::updateZoomInfo().


The documentation for this class was generated from the following files: