#include <XpdfWidget.h>
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... | |
Signals | |
| void | pageChange (int pageNum) |
| This signal is emitted whenever the viewer displays a new page. | |
| void | midPageChange (int pageNum) |
| This signal is emitted whenever the page shown at the middle of the window changes. | |
| void | keyPress (QKeyEvent *e) |
| This signal is emitted whenever a key is pressed. | |
| void | mousePress (QMouseEvent *e) |
| This signal is emitted whenever a mouse button is pressed. | |
| void | mouseRelease (QMouseEvent *e) |
| This signal is emitted whenever a mouse button is released. | |
| void | mouseMove (QMouseEvent *e) |
| This signal is emitted whenever the mouse pointer is moved. | |
| void | linkClick (const QString &linkType, const QString &dest, int page) |
| This signal is emitted whenever the user clicks on a hyperlink. | |
| void | selectDone () |
| This signal is emitted when the user selects an area. | |
Public Member Functions | |
| XpdfWidget (const QColor &paperColor=QColor(0xff, 0xff, 0xff), const QColor &matteColor=QColor(0x80, 0x80, 0x80), bool reverseVideo=false, QWidget *parentA=0) | |
| The XpdfWidget constructor. | |
| virtual | ~XpdfWidget () |
| Destroys the XpdfWidget. | |
| void | enableHyperlinks (bool on) |
| Control handling of hyperlinks. | |
| void | enableSelect (bool on) |
| Control handling of text selection. | |
| void | enablePan (bool on) |
| Control mouse panning. | |
| void | setKeyPassthrough (bool on) |
| Control keypress passthrough. | |
| void | showPasswordDialog (bool showDlg) |
| Control the password dialog. | |
| void | setMatteColor (const QColor &matteColor) |
| Set the matte color, i.e., the color used for background outside the actual page area. | |
| void | setReverseVideo (bool reverse) |
| Turn reverse video mode on/off. The default is off. | |
| ErrorCode | loadFile (const QString &fileName, const QString &password="") |
| Load a PDF file and display its first page. | |
| ErrorCode | loadMem (const char *buffer, unsigned int bufferLength, const QString &password="") |
| Load a PDF file from a memory buffer and display its first page. | |
| void | closeFile () |
| Close the currently open PDF file (if any). | |
| ErrorCode | saveAs (const QString &fileName) |
| Save the PDF file with another name. | |
| QString | getFileName () |
| Get the file name of the currently open PDF file. | |
| int | getNumPages () |
| Return the number of pages in the currently open PDF file. | |
| int | getCurrentPage () |
| Return the currently displayed page number. | |
| void | gotoPage (int pageNum) |
| Display the specified page. | |
| void | gotoFirstPage () |
| Display the first page. | |
| void | gotoLastPage () |
| Display the last page. | |
| void | gotoNextPage () |
| Display the next page. | |
| void | gotoPreviousPage () |
| Display the previous page. | |
| bool | gotoNamedDestination (const QString &dest) |
| Go to a named destination. | |
| void | goForward () |
| Go forward along the history list. | |
| void | goBackward () |
| Go backward along the history list. | |
| void | scrollPageUp () |
| Scroll one screen up. | |
| void | scrollPageDown () |
| Scroll one screen down. | |
| void | 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. | |
| void | scrollBy (int dx, int dy) |
| Scroll the page by (dx,dy) pixels. | |
| int | getScrollX () |
| Return the current scroll position x coordinate. | |
| int | getScrollY () |
| Return the current scroll position y coordinate. | |
| void | setZoom (double zoom) |
| Change the zoom factor. | |
| double | getZoom () |
| Return the current zoom factor. | |
| double | getZoomPercent () |
| Return the current zoom factor as a percentage. | |
| void | zoomToRect (int page, double xMin, double yMin, double xMax, double yMax) |
| Zoom in to the specified rectangle. | |
| void | zoomCentered (double zoom) |
| Set the zoom factor, while maintaining the current center. | |
| void | zoomToCurrentWidth () |
| Zoom so that the current page(s) fill the window width. | |
| void | setRotate (int rotate) |
| Change the page rotation. | |
| int | getRotate () |
| Return the current page rotation. | |
| void | setContinuousMode (bool continuous) |
| Set continuous or single-page view mode. | |
| bool | getContinuousMode () |
| Return true if the viewer is in continuous view mode, or false if it is in single page view mode. | |
| bool | onLink (int page, double xx, double yy) |
| Returns true if the specified coordinates are inside a hyperlink. | |
| void | gotoLinkAt (int page, double xx, double yy) |
| Activate the link (if any) at the specified page and coordinates. | |
| void | convertWindowToPDFCoords (int winX, int winY, int *page, double *pdfX, double *pdfY) |
| Convert window coordinates to PDF coordinates. | |
| void | convertPDFToWindowCoords (int page, double pdfX, double pdfY, int *winX, int *winY) |
| Convert PDF coordinates to window coordinates. | |
| void | enableRedraw (bool enable) |
| Enable or disable window redraws. | |
| void | getPageBox (int page, const QString &box, double *xMin, double *yMin, double *xMax, double *yMax) |
| Return the coordinates of the specified page box. | |
| double | getPageWidth (int page) |
| Return the width of the specified page. | |
| double | getPageHeight (int page) |
| Return the height of the specified page. | |
| int | getPageRotation (int page) |
| Get the default rotation for the specified page. | |
| bool | getCurrentSelection (int *page, double *x0, double *y0, double *x1, double *y1) |
| Returns the current selection. | |
| void | setCurrentSelection (int page, double x0, double y0, double x1, double y1) |
| Set the selection. | |
| QImage * | convertPageToImage (int page, double dpi) |
| Convert a page to a color image. | |
| QImage * | convertRegionToImage (int page, double x0, double y0, double x1, double y1, double dpi) |
| Convert a rectangular region of a page to a color image. | |
| bool | okToExtractText () |
| Checks to see if text extraction is allowed. | |
| void | setTextEncoding (const QString &encodingName) |
| Set the encoding to use for text extraction. | |
| QString | extractText (int page, double x0, double y0, double x1, double y1) |
| Extract text from a region of a page. | |
| void | copySelection () |
| Copy the current selection to the clipboard. | |
| bool | find (const QString &text, int flags=0) |
| Find a text string. | |
| int | getOutlineNumChildren (XpdfOutlineHandle outline) |
| Return the number of children of an outline tree node. | |
| XpdfOutlineHandle | getOutlineChild (XpdfOutlineHandle outline, int idx) |
| Return a child of an outline tree node. | |
| QString | getOutlineTitle (XpdfOutlineHandle outline) |
| Get the title of an outline tree node. | |
| bool | getOutlineStartsOpen (XpdfOutlineHandle outline) |
| Return true if the specified outline entry starts open. | |
| int | getOutlineTargetPage (XpdfOutlineHandle outline) |
| Return the target page number for the specified outline entry. | |
| void | gotoOutlineTarget (XpdfOutlineHandle outline) |
| Jump to the target of the specified outline entry. | |
| int | getNumLayers () |
| Return the number of layers in the PDF file. | |
| XpdfLayerHandle | getLayer (int idx) |
| Get a layer handle. | |
| QString | getLayerName (XpdfLayerHandle layer) |
| Get the name of a layer. | |
| bool | getLayerVisibility (XpdfLayerHandle layer) |
| Get the visibility state of a layer. | |
| void | setLayerVisibility (XpdfLayerHandle layer, bool visibility) |
| Set the visibility state of a layer. | |
| int | getLayerViewState (XpdfLayerHandle layer) |
| Get the suggested state for this layer in viewing mode. | |
| int | getLayerPrintState (XpdfLayerHandle layer) |
| Get the suggested state for this layer in printing mode. | |
Static Public Member Functions | |
| static void | init (const QString &configFileName=QString()) |
| Initialize the XpdfWidget class, reading a configuration file. | |
| static void | setConfig (const QString &command) |
| Process a configuration command, i.e., one line of an xpdfrc file. | |
Static Public Attributes | |
Zoom values | |
| static const int | zoomToPage = -1 |
| zoom to fit whole page | |
| static const int | zoomToWidth = -2 |
| zoom to fit page width | |
Find flags | |
| static const int | findBackward = 0x00000001 |
| search backward from the starting point | |
| static const int | findCaseSensitive = 0x00000002 |
| perform a case-sensitive search (default is case-insensitive) | |
| static const int | findNext = 0x00000004 |
| start searching from the previous search result | |
| static const int | findOnePageOnly = 0x00000008 |
| limit the search to the current page | |
Error codes returned by certain XpdfViewer functions.
| 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.
| paperColor | the paper background color (which should generally be left as white) | |
| matteColor | the matte color displayed between pages, and around pages that are smaller than the window | |
| reverseVideo | sets reverse video at startup | |
| parentA | the parent QWidget |
| virtual XpdfWidget::~XpdfWidget | ( | ) | [virtual] |
Destroys the XpdfWidget.
| static 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; ~/ on Unix)..xpdfrc
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.
| static 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| void XpdfWidget::setReverseVideo | ( | bool | reverse | ) |
Turn reverse video mode on/off. The default is off.
| ErrorCode XpdfWidget::loadFile | ( | const QString & | fileName, | |
| const QString & | password = "" | |||
| ) |
Load a PDF file and display its first page.
| fileName | the PDF file to load | |
| password | a string to be tried first as the owner password and then as the user password |
pdfOk if successful; an error code, otherwise | 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.
| buffer | the PDF file in memory | |
| bufferLength | length of buffer | |
| password | a string to be tried first as the owner password and then as the user password |
pdfOk if successful; an error code otherwise | 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.
| ErrorCode XpdfWidget::saveAs | ( | const QString & | fileName | ) |
Save the PDF file with another name.
| fileName | the file to be written |
pdfOk if successfule; an error code otherwise | QString XpdfWidget::getFileName | ( | ) |
Get the file name of the currently open PDF file.
| int XpdfWidget::getNumPages | ( | ) |
Return the number of pages in the currently open PDF file.
Returns -1 if no file is open.
| int XpdfWidget::getCurrentPage | ( | ) |
Return the currently displayed page number.
Returns -1 if no file is open.
| void XpdfWidget::gotoPage | ( | int | pageNum | ) |
Display the specified page.
| void XpdfWidget::gotoFirstPage | ( | ) |
| void XpdfWidget::gotoLastPage | ( | ) |
| void XpdfWidget::gotoNextPage | ( | ) |
Display the next page.
| void XpdfWidget::gotoPreviousPage | ( | ) |
Display the previous page.
| bool XpdfWidget::gotoNamedDestination | ( | const QString & | dest | ) |
Go to a named destination.
| void XpdfWidget::goForward | ( | ) |
Go forward along the history list.
| void XpdfWidget::goBackward | ( | ) |
Go backward along the history list.
| void XpdfWidget::scrollPageUp | ( | ) |
Scroll one screen up.
| void XpdfWidget::scrollPageDown | ( | ) |
Scroll one screen down.
| 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.
| 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.
| int XpdfWidget::getScrollX | ( | ) |
Return the current scroll position x coordinate.
| int XpdfWidget::getScrollY | ( | ) |
Return the current scroll position y coordinate.
| 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.
| double XpdfWidget::getZoom | ( | ) |
Return the current zoom factor.
This can be a percentage factor or one of the special values, XpdfWidget::zoomToPage or XpdfWidget::zoomToWidth.
| double XpdfWidget::getZoomPercent | ( | ) |
Return the current zoom factor as a percentage.
If the zoom is set to XpdfWidget::zoomToPage or XpdfWidget::zoomToWidth, returns the computed zoom percentage based on the current window size.
| 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.
| void XpdfWidget::zoomCentered | ( | double | zoom | ) |
Set the zoom factor, while maintaining the current center.
Accepts the same zoom values as XpdfWidget::setZoom.
| void XpdfWidget::zoomToCurrentWidth | ( | ) |
Zoom so that the current page(s) fill the window width.
Maintains the vertical center.
| void XpdfWidget::setRotate | ( | int | rotate | ) |
Change the page rotation.
| rotate | rotation angle in degrees - must be 0, 90, 180, or 270 |
| int XpdfWidget::getRotate | ( | ) |
Return the current page rotation.
The angle can be 0, 90, 180, or 270.
| void XpdfWidget::setContinuousMode | ( | bool | continuous | ) |
Set continuous or single-page view mode.
| continuous | true for continous view mode, false for single-page view mode |
| bool XpdfWidget::getContinuousMode | ( | ) |
Return true if the viewer is in continuous view mode, or false if it is in single page view mode.
| 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.
| void XpdfWidget::gotoLinkAt | ( | int | page, | |
| double | xx, | |||
| double | yy | |||
| ) |
Activate the link (if any) at the specified page and coordinates.
Note: This function expects PDF coordinates, not window coordinates.
| void XpdfWidget::convertWindowToPDFCoords | ( | int | winX, | |
| int | winY, | |||
| int * | page, | |||
| double * | pdfX, | |||
| double * | pdfY | |||
| ) |
Convert window coordinates to PDF coordinates.
| void XpdfWidget::convertPDFToWindowCoords | ( | int | page, | |
| double | pdfX, | |||
| double | pdfY, | |||
| int * | winX, | |||
| int * | winY | |||
| ) |
Convert PDF coordinates to window coordinates.
| void XpdfWidget::enableRedraw | ( | bool | enable | ) |
Enable or disable window redraws.
This is useful, e.g., for avoiding extra redraws during window resizing.
| void XpdfWidget::getPageBox | ( | int | page, | |
| const QString & | box, | |||
| double * | xMin, | |||
| double * | yMin, | |||
| double * | xMax, | |||
| double * | yMax | |||
| ) |
Return the coordinates of the specified page box.
| page | the page number | |
| box | the requested page box - one of "media", "crop", "bleed", "trim", or "art" (box is not case-sensitive) | |
| *xMin | returns the minimum x coordinate of the box | |
| *yMin | returns the minimum y coordinate of the box | |
| *xMax | returns the maximum x coordinate of the box | |
| *yMax | returns the maximum y coordinate of the box |
| double XpdfWidget::getPageWidth | ( | int | page | ) |
Return the width of the specified page.
This function returns the crop box width, measured in points (1 point = 1/72 inch).
| double XpdfWidget::getPageHeight | ( | int | page | ) |
Return the height of the specified page.
This function returns the crop box height, measured in points (1 point = 1/72 inch).
| int XpdfWidget::getPageRotation | ( | int | page | ) |
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.
| bool XpdfWidget::getCurrentSelection | ( | int * | page, | |
| double * | x0, | |||
| double * | y0, | |||
| double * | x1, | |||
| double * | y1 | |||
| ) |
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.
| 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.
| QImage* XpdfWidget::convertPageToImage | ( | int | page, | |
| double | dpi | |||
| ) |
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. The caller is responsible for deleting the QImage when finished with it.
| QImage* XpdfWidget::convertRegionToImage | ( | int | page, | |
| double | x0, | |||
| double | y0, | |||
| double | x1, | |||
| double | y1, | |||
| double | dpi | |||
| ) |
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. The caller is responsible for deleting the QImage when finished with it.
| bool XpdfWidget::okToExtractText | ( | ) |
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.
| 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 formatAdditional encodings can be defined via the xpdfrc config file.
| 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 is no file is open or if text extraction is not allowed.
| void XpdfWidget::copySelection | ( | ) |
Copy the current selection to the clipboard.
| 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 pointfindCaseSensitive - perform a case-sensitive search (default is case-insensitive)findNext - start searching from the previous search resultfindOnePageOnly - limit the search to the current page | 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.
| 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.
| QString XpdfWidget::getOutlineTitle | ( | XpdfOutlineHandle | outline | ) |
Get the title of an outline tree node.
This function returns the title of node outline.
| bool XpdfWidget::getOutlineStartsOpen | ( | XpdfOutlineHandle | outline | ) |
Return true if the specified outline entry starts open.
| int XpdfWidget::getOutlineTargetPage | ( | XpdfOutlineHandle | outline | ) |
Return the target page number for the specified outline entry.
| void XpdfWidget::gotoOutlineTarget | ( | XpdfOutlineHandle | outline | ) |
Jump to the target of the specified outline entry.
| int XpdfWidget::getNumLayers | ( | ) |
Return the number of layers in the PDF file.
Note that a PDF file can have zero or more layers.
| XpdfLayerHandle XpdfWidget::getLayer | ( | int | idx | ) |
Get a layer handle.
This function returns a handle for the idx 'th layer.
| QString XpdfWidget::getLayerName | ( | XpdfLayerHandle | layer | ) |
Get the name of a layer.
This function returns the title of layer.
| bool XpdfWidget::getLayerVisibility | ( | XpdfLayerHandle | layer | ) |
Get the visibility state of a layer.
Returns true if the layer is currently visible, false if not.
| void XpdfWidget::setLayerVisibility | ( | XpdfLayerHandle | layer, | |
| bool | visibility | |||
| ) |
Set the visibility state of a layer.
| layer | the layer handle | |
| visibility | the new state - true for visible, false for not visible |
| int XpdfWidget::getLayerViewState | ( | XpdfLayerHandle | layer | ) |
Get the suggested state for this layer in viewing mode.
This function returns one of:
| int XpdfWidget::getLayerPrintState | ( | XpdfLayerHandle | layer | ) |
Get the suggested state for this layer in printing mode.
This function returns one of:
| 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).
| pageNum | - the new page number |
| 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).
| void XpdfWidget::keyPress | ( | QKeyEvent * | e | ) | [signal] |
This signal is emitted whenever a key is pressed.
| void XpdfWidget::mousePress | ( | QMouseEvent * | e | ) | [signal] |
This signal is emitted whenever a mouse button is pressed.
| void XpdfWidget::mouseRelease | ( | QMouseEvent * | e | ) | [signal] |
This signal is emitted whenever a mouse button is released.
| void XpdfWidget::mouseMove | ( | QMouseEvent * | e | ) | [signal] |
This signal is emitted whenever the mouse pointer is moved.
| void XpdfWidget::linkClick | ( | const QString & | linkType, | |
| const QString & | dest, | |||
| int | page | |||
| ) | [signal] |
This signal is emitted whenever the user clicks on a hyperlink.
| linkType | the type of link - one of:
| |
| dest | destination string | |
| page | destination page number |
| void XpdfWidget::selectDone | ( | ) | [signal] |
This signal is emitted when the user selects an area.
Use XpdfWidget::getCurrentSelection to retrieve the selection.
const int XpdfWidget::zoomToPage = -1 [static] |
zoom to fit whole page
const int XpdfWidget::zoomToWidth = -2 [static] |
zoom to fit page width
const int XpdfWidget::findBackward = 0x00000001 [static] |
search backward from the starting point
const int XpdfWidget::findCaseSensitive = 0x00000002 [static] |
perform a case-sensitive search (default is case-insensitive)
const int XpdfWidget::findNext = 0x00000004 [static] |
start searching from the previous search result
const int XpdfWidget::findOnePageOnly = 0x00000008 [static] |
limit the search to the current page
1.5.2