![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qpdfdocument_p.h>
Classes | |
struct | TextPosition |
Public Types | |
enum | QFPDFRotation { Normal = 0 , ClockWise90 = 1 , ClockWise180 = 2 , CounterClockWise90 = 3 } |
Public Member Functions | |
QPdfDocumentPrivate () | |
~QPdfDocumentPrivate () | |
void | clear () |
void | load (QIODevice *device, bool ownDevice) |
void | loadAsync (QIODevice *device) |
void | _q_tryLoadingWithSizeFromContentHeader () |
void | initiateAsyncLoadWithTotalSizeKnown (quint64 totalSize) |
void | _q_copyFromSequentialSourceDevice () |
void | tryLoadDocument () |
void | checkComplete () |
bool | checkPageComplete (int page) |
void | setStatus (QPdfDocument::Status status) |
void | updateLastError () |
QString | getText (FPDF_TEXTPAGE textPage, int startIndex, int count) const |
QPointF | getCharPosition (FPDF_PAGE pdfPage, FPDF_TEXTPAGE textPage, int charIndex) const |
QRectF | getCharBox (FPDF_PAGE pdfPage, FPDF_TEXTPAGE textPage, int charIndex) const |
QPointF | mapPageToView (FPDF_PAGE pdfPage, double x, double y) const |
QRectF | mapPageToView (FPDF_PAGE pdfPage, double left, double top, double right, double bottom) const |
QPointF | mapViewToPage (FPDF_PAGE pdfPage, QPointF position) const |
TextPosition | hitTest (int page, QPointF position) |
Static Public Member Functions | |
static FPDF_BOOL | fpdf_IsDataAvail (struct _FX_FILEAVAIL *pThis, size_t offset, size_t size) |
static int | fpdf_GetBlock (void *param, unsigned long position, unsigned char *pBuf, unsigned long size) |
static void | fpdf_AddSegment (struct _FX_DOWNLOADHINTS *pThis, size_t offset, size_t size) |
static constexpr QFPDFRotation | toFPDFRotation (QPdfDocumentRenderOptions::Rotation rotation) |
Public Attributes | |
QPdfDocument * | q |
QPdfPageModel * | pageModel = nullptr |
FPDF_AVAIL | avail |
FPDF_DOCUMENT | doc |
bool | loadComplete |
QPointer< QIODevice > | device |
QScopedPointer< QIODevice > | ownDevice |
QBuffer | asyncBuffer |
QPointer< QIODevice > | sequentialSourceDevice |
QByteArray | password |
QPdfDocument::Status | status |
QPdfDocument::Error | lastError |
int | pageCount |
Public Attributes inherited from FPDF_FILEACCESS | |
unsigned long | m_FileLen |
int(* | m_GetBlock )(void *param, unsigned long position, unsigned char *pBuf, unsigned long size) |
void * | m_Param |
Public Attributes inherited from _FX_FILEAVAIL | |
int | version |
FPDF_BOOL(* | IsDataAvail )(struct _FX_FILEAVAIL *pThis, size_t offset, size_t size) |
Public Attributes inherited from _FX_DOWNLOADHINTS | |
int | version |
void(* | AddSegment )(struct _FX_DOWNLOADHINTS *pThis, size_t offset, size_t size) |
Definition at line 41 of file qpdfdocument_p.h.
Enumerator | |
---|---|
Normal | |
ClockWise90 | |
ClockWise180 | |
CounterClockWise90 |
Definition at line 91 of file qpdfdocument_p.h.
QPdfDocumentPrivate::QPdfDocumentPrivate | ( | ) |
Definition at line 107 of file qpdfdocument.cpp.
QPdfDocumentPrivate::~QPdfDocumentPrivate | ( | ) |
Definition at line 141 of file qpdfdocument.cpp.
void QPdfDocumentPrivate::_q_copyFromSequentialSourceDevice | ( | ) |
Definition at line 312 of file qpdfdocument.cpp.
void QPdfDocumentPrivate::_q_tryLoadingWithSizeFromContentHeader | ( | ) |
Definition at line 277 of file qpdfdocument.cpp.
void QPdfDocumentPrivate::checkComplete | ( | ) |
Definition at line 361 of file qpdfdocument.cpp.
bool QPdfDocumentPrivate::checkPageComplete | ( | int | page | ) |
Definition at line 400 of file qpdfdocument.cpp.
void QPdfDocumentPrivate::clear | ( | ) |
Definition at line 153 of file qpdfdocument.cpp.
|
static |
Definition at line 443 of file qpdfdocument.cpp.
|
static |
Definition at line 435 of file qpdfdocument.cpp.
|
static |
Definition at line 429 of file qpdfdocument.cpp.
QRectF QPdfDocumentPrivate::getCharBox | ( | FPDF_PAGE | pdfPage, |
FPDF_TEXTPAGE | textPage, | ||
int | charIndex ) const |
Definition at line 468 of file qpdfdocument.cpp.
QPointF QPdfDocumentPrivate::getCharPosition | ( | FPDF_PAGE | pdfPage, |
FPDF_TEXTPAGE | textPage, | ||
int | charIndex ) const |
Definition at line 459 of file qpdfdocument.cpp.
QString QPdfDocumentPrivate::getText | ( | FPDF_TEXTPAGE | textPage, |
int | startIndex, | ||
int | count ) const |
Definition at line 450 of file qpdfdocument.cpp.
QPdfDocumentPrivate::TextPosition QPdfDocumentPrivate::hitTest | ( | int | page, |
QPointF | position ) |
Definition at line 528 of file qpdfdocument.cpp.
Definition at line 302 of file qpdfdocument.cpp.
Definition at line 207 of file qpdfdocument.cpp.
QRectF QPdfDocumentPrivate::mapPageToView | ( | FPDF_PAGE | pdfPage, |
double | left, | ||
double | top, | ||
double | right, | ||
double | bottom ) const |
Convert the bounding box defined by left top right and bottom to the usual 1x (pixels = points) 4th-quadrant "view" coordinate system that we use for rendering things on top of the page image. Some PDF files have internal transforms that make this coordinate system different from "page coordinates", so we cannot just subtract from page height to invert the y coordinates, in general.
Definition at line 501 of file qpdfdocument.cpp.
Convert the point x , y to the usual 1x (pixels = points) 4th-quadrant "view" coordinate system relative to the top-left corner of the rendered page. Some PDF files have internal transforms that make this coordinate system different from "page coordinates", so we cannot just subtract from page height to invert the y coordinates, in general.
Definition at line 483 of file qpdfdocument.cpp.
Convert the point x , y from the usual 1x (pixels = points) 4th-quadrant "view" coordinate system relative to the top-left corner of the rendered page, to "page coordinates" suited to the given pdfPage, which may have arbitrary internal transforms.
Definition at line 518 of file qpdfdocument.cpp.
void QPdfDocumentPrivate::setStatus | ( | QPdfDocument::Status | status | ) |
Definition at line 420 of file qpdfdocument.cpp.
|
inlinestaticconstexpr |
Definition at line 98 of file qpdfdocument_p.h.
void QPdfDocumentPrivate::tryLoadDocument | ( | ) |
Definition at line 327 of file qpdfdocument.cpp.
void QPdfDocumentPrivate::updateLastError | ( | ) |
Definition at line 182 of file qpdfdocument.cpp.
QBuffer QPdfDocumentPrivate::asyncBuffer |
Definition at line 56 of file qpdfdocument_p.h.
FPDF_AVAIL QPdfDocumentPrivate::avail |
Definition at line 50 of file qpdfdocument_p.h.
Definition at line 54 of file qpdfdocument_p.h.
FPDF_DOCUMENT QPdfDocumentPrivate::doc |
Definition at line 51 of file qpdfdocument_p.h.
QPdfDocument::Error QPdfDocumentPrivate::lastError |
Definition at line 61 of file qpdfdocument_p.h.
bool QPdfDocumentPrivate::loadComplete |
Definition at line 52 of file qpdfdocument_p.h.
QScopedPointer<QIODevice> QPdfDocumentPrivate::ownDevice |
Definition at line 55 of file qpdfdocument_p.h.
int QPdfDocumentPrivate::pageCount |
Definition at line 62 of file qpdfdocument_p.h.
QPdfPageModel* QPdfDocumentPrivate::pageModel = nullptr |
Definition at line 48 of file qpdfdocument_p.h.
QByteArray QPdfDocumentPrivate::password |
Definition at line 58 of file qpdfdocument_p.h.
QPdfDocument* QPdfDocumentPrivate::q |
Definition at line 47 of file qpdfdocument_p.h.
Definition at line 57 of file qpdfdocument_p.h.
QPdfDocument::Status QPdfDocumentPrivate::status |
Definition at line 60 of file qpdfdocument_p.h.