![]() |
Qt 6.x
The Qt SDK
|
#include <qpdfdocument_p.h>
Inheritance diagram for QPdfDocumentPrivate:
Collaboration diagram for QPdfDocumentPrivate: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) |
| QPointF | getCharPosition (FPDF_TEXTPAGE textPage, double pageHeight, int charIndex) |
| QRectF | getCharBox (FPDF_TEXTPAGE textPage, double pageHeight, int charIndex) |
| 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 |
Definition at line 40 of file qpdfdocument_p.h.
| Enumerator | |
|---|---|
| Normal | |
| ClockWise90 | |
| ClockWise180 | |
| CounterClockWise90 | |
Definition at line 87 of file qpdfdocument_p.h.
| QPdfDocumentPrivate::QPdfDocumentPrivate | ( | ) |
Definition at line 106 of file qpdfdocument.cpp.
References asyncBuffer, fpdf_AddSegment(), fpdf_GetBlock(), fpdf_IsDataAvail(), libraryRefCount, lock, QBuffer::open(), qCDebug, QIODeviceBase::ReadWrite, QBuffer::setData(), QTimer::start(), and timer.
Here is the call graph for this function:| QPdfDocumentPrivate::~QPdfDocumentPrivate | ( | ) |
Definition at line 140 of file qpdfdocument.cpp.
References libraryRefCount, lock, and qCDebug.
| void QPdfDocumentPrivate::_q_copyFromSequentialSourceDevice | ( | ) |
Definition at line 311 of file qpdfdocument.cpp.
References asyncBuffer, QIODevice::bytesAvailable(), checkComplete(), loadComplete, QIODevice::read(), QBuffer::seek(), sequentialSourceDevice, QBuffer::size(), and QIODevice::write().
Referenced by _q_tryLoadingWithSizeFromContentHeader().
Here is the call graph for this function:
Here is the caller graph for this function:| void QPdfDocumentPrivate::_q_tryLoadingWithSizeFromContentHeader | ( | ) |
Definition at line 276 of file qpdfdocument.cpp.
References _q_copyFromSequentialSourceDevice(), avail, QIODevice::bytesAvailable(), QObject::connect(), QNetworkRequest::ContentLengthHeader, QPdfDocument::Error, QNetworkReply::header(), initiateAsyncLoadWithTotalSizeKnown(), QVariant::isValid(), sequentialSourceDevice, setStatus(), SIGNAL, SLOT, and QVariant::toULongLong().
Referenced by load().
Here is the call graph for this function:
Here is the caller graph for this function:| void QPdfDocumentPrivate::checkComplete | ( | ) |
Definition at line 360 of file qpdfdocument.cpp.
References avail, doc, emit, i, loadComplete, lock, pageCount, QPdfDocument::Ready, setStatus(), and tryLoadDocument().
Referenced by _q_copyFromSequentialSourceDevice().
Here is the call graph for this function:
Here is the caller graph for this function:| bool QPdfDocumentPrivate::checkPageComplete | ( | int | page | ) |
Definition at line 399 of file qpdfdocument.cpp.
References avail, loadComplete, lock, page, pageCount, and updateLastError().
Referenced by load(), QPdfDocument::pagePointSize(), and QPdfDocument::render().
Here is the call graph for this function:
Here is the caller graph for this function:| void QPdfDocumentPrivate::clear | ( | ) |
Definition at line 152 of file qpdfdocument.cpp.
References asyncBuffer, avail, QBuffer::close(), QObject::disconnect(), doc, emit, loadComplete, lock, QBuffer::open(), pageCount, QIODeviceBase::ReadWrite, sequentialSourceDevice, and QBuffer::setData().
Referenced by QPdfDocument::close().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 442 of file qpdfdocument.cpp.
References Q_UNUSED.
Referenced by QPdfDocumentPrivate().
Here is the caller graph for this function:
|
static |
Definition at line 434 of file qpdfdocument.cpp.
References d, position(), and qMax().
Referenced by QPdfDocumentPrivate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 428 of file qpdfdocument.cpp.
References d.
Referenced by QPdfDocumentPrivate().
Here is the caller graph for this function:| QRectF QPdfDocumentPrivate::getCharBox | ( | FPDF_TEXTPAGE | textPage, |
| double | pageHeight, | ||
| int | charIndex | ||
| ) |
Definition at line 468 of file qpdfdocument.cpp.
References ok.
Referenced by QPdfDocument::getSelection(), and hitTest().
Here is the caller graph for this function:| QPointF QPdfDocumentPrivate::getCharPosition | ( | FPDF_TEXTPAGE | textPage, |
| double | pageHeight, | ||
| int | charIndex | ||
| ) |
Definition at line 458 of file qpdfdocument.cpp.
Referenced by QPdfDocument::getSelectionAtIndex(), and hitTest().
Here is the call graph for this function:
Here is the caller graph for this function:| QString QPdfDocumentPrivate::getText | ( | FPDF_TEXTPAGE | textPage, |
| int | startIndex, | ||
| int | count | ||
| ) |
Definition at line 449 of file qpdfdocument.cpp.
References QString::fromUtf16(), and Q_ASSERT.
Referenced by QPdfDocument::getAllText(), QPdfDocument::getSelection(), and QPdfDocument::getSelectionAtIndex().
Here is the call graph for this function:
Here is the caller graph for this function:| QPdfDocumentPrivate::TextPosition QPdfDocumentPrivate::hitTest | ( | int | page, |
| QPointF | position | ||
| ) |
Definition at line 477 of file qpdfdocument.cpp.
References CharacterHitTolerance, doc, getCharBox(), getCharPosition(), QRectF::height(), QPointF::isNull(), lock, page, position(), qAbs(), qCDebug, QRectF::right(), QPointF::setX(), and QPointF::x().
Here is the call graph for this function:Definition at line 301 of file qpdfdocument.cpp.
Referenced by _q_tryLoadingWithSizeFromContentHeader(), and load().
Here is the caller graph for this function:Definition at line 206 of file qpdfdocument.cpp.
References _q_tryLoadingWithSizeFromContentHeader(), asyncBuffer, avail, QIODevice::bytesAvailable(), checkPageComplete(), QObject::connect(), QNetworkRequest::ContentLengthHeader, device, doc, emit, QNetworkReply::error(), QPdfDocument::Error, QNetworkReply::finished(), QNetworkReply::header(), initiateAsyncLoadWithTotalSizeKnown(), QNetworkReply::isFinished(), QIODevice::isSequential(), QVariant::isValid(), lock, QNetworkReply::NoError, ownDevice, pageCount, qWarning, QPdfDocument::Ready, reply, QScopedPointer< T, Cleanup >::reset(), sequentialSourceDevice, setStatus(), SIGNAL, QIODevice::size(), SLOT, tryLoadDocument(), and updateLastError().
Referenced by QPdfDocument::load(), and QPdfDocument::load().
Here is the call graph for this function:
Here is the caller graph for this function:| void QPdfDocumentPrivate::setStatus | ( | QPdfDocument::Status | status | ) |
Definition at line 419 of file qpdfdocument.cpp.
Referenced by _q_tryLoadingWithSizeFromContentHeader(), checkComplete(), QPdfDocument::close(), QPdfDocument::load(), QPdfDocument::load(), load(), and tryLoadDocument().
Here is the caller graph for this function:
|
inlinestaticconstexpr |
Definition at line 94 of file qpdfdocument_p.h.
References QPdfDocumentRenderOptions::Clockwise180, QPdfDocumentRenderOptions::Clockwise270, QPdfDocumentRenderOptions::Clockwise90, and QPdfDocumentRenderOptions::None.
Referenced by QPdfDocument::render().
Here is the caller graph for this function:| void QPdfDocumentPrivate::tryLoadDocument | ( | ) |
Definition at line 326 of file qpdfdocument.cpp.
References avail, QPdfDocument::DataNotYetAvailable, doc, emit, QPdfDocument::Error, QPdfDocument::IncorrectPassword, lastError, lock, QPdfDocument::None, password, Q_ASSERT, qCDebug, setStatus(), and updateLastError().
Referenced by checkComplete(), and load().
Here is the call graph for this function:
Here is the caller graph for this function:| void QPdfDocumentPrivate::updateLastError | ( | ) |
Definition at line 181 of file qpdfdocument.cpp.
References doc, error, QPdfDocument::FileNotFound, QPdfDocument::IncorrectPassword, QPdfDocument::InvalidFileFormat, lastError, lock, QPdfDocument::None, qCDebug, QPdfDocument::Unknown, and QPdfDocument::UnsupportedSecurityScheme.
Referenced by checkPageComplete(), load(), and tryLoadDocument().
Here is the caller graph for this function:| QBuffer QPdfDocumentPrivate::asyncBuffer |
Definition at line 55 of file qpdfdocument_p.h.
Referenced by QPdfDocumentPrivate(), _q_copyFromSequentialSourceDevice(), clear(), and load().
| FPDF_AVAIL QPdfDocumentPrivate::avail |
Definition at line 49 of file qpdfdocument_p.h.
Referenced by _q_tryLoadingWithSizeFromContentHeader(), checkComplete(), checkPageComplete(), clear(), initiateAsyncLoadWithTotalSizeKnown(), load(), and tryLoadDocument().
Definition at line 53 of file qpdfdocument_p.h.
Referenced by load().
| FPDF_DOCUMENT QPdfDocumentPrivate::doc |
Definition at line 50 of file qpdfdocument_p.h.
Referenced by checkComplete(), clear(), QPdfDocument::close(), QPdfSearchModelPrivate::doSearch(), QPdfDocument::getAllText(), QPdfDocument::getSelection(), QPdfDocument::getSelectionAtIndex(), hitTest(), load(), QPdfDocument::metaData(), QPdfDocument::pageLabel(), QPdfDocument::pagePointSize(), QPdfBookmarkModelPrivate::rebuild(), QPdfDocument::render(), tryLoadDocument(), QPdfLinkModelPrivate::update(), and updateLastError().
| QPdfDocument::Error QPdfDocumentPrivate::lastError |
Definition at line 60 of file qpdfdocument_p.h.
Referenced by QPdfDocument::error(), QPdfDocument::load(), tryLoadDocument(), and updateLastError().
| bool QPdfDocumentPrivate::loadComplete |
Definition at line 51 of file qpdfdocument_p.h.
Referenced by _q_copyFromSequentialSourceDevice(), checkComplete(), checkPageComplete(), and clear().
| QScopedPointer<QIODevice> QPdfDocumentPrivate::ownDevice |
Definition at line 54 of file qpdfdocument_p.h.
Referenced by load().
| int QPdfDocumentPrivate::pageCount |
Definition at line 61 of file qpdfdocument_p.h.
Referenced by checkComplete(), checkPageComplete(), clear(), load(), QPdfDocument::pageCount(), and QPdfDocument::pageIndexForLabel().
| QPdfPageModel* QPdfDocumentPrivate::pageModel = nullptr |
Definition at line 47 of file qpdfdocument_p.h.
| QByteArray QPdfDocumentPrivate::password |
Definition at line 57 of file qpdfdocument_p.h.
Referenced by QPdfDocument::close(), QPdfDocument::password(), QPdfDocument::setPassword(), and tryLoadDocument().
| QPdfDocument* QPdfDocumentPrivate::q |
Definition at line 46 of file qpdfdocument_p.h.
Referenced by QPdfDocument::QPdfDocument().
Definition at line 56 of file qpdfdocument_p.h.
Referenced by _q_copyFromSequentialSourceDevice(), _q_tryLoadingWithSizeFromContentHeader(), clear(), and load().
| QPdfDocument::Status QPdfDocumentPrivate::status |
Definition at line 59 of file qpdfdocument_p.h.
Referenced by setStatus(), and QPdfDocument::status().