summaryrefslogtreecommitdiffstats
path: root/tests/auto/pdf
Commit message (Collapse)AuthorAgeFilesLines
* Nuke all qmake files from testsMichal Klocek2021-09-016-34/+0
| | | | | | | Change-Id: Ibad2e50d840a2eb0ccb9ac65158e512249a2bc79 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 24a695b4b7fda581c15600b111d6b6c3459ca1d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add QtPdf to cmake buildMichal Klocek2021-08-186-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port QtPdf to Qt6: * QtPdf,QtPdfWidgets,QtPdfQuick libs * QtPdfQuickPlugin, QtPdfPlugin (imageformat) plugins * widget and quick examples * qtpdf tests To fit gn cmake integration and new repo layout code is a bit reshuffled. Compared to qmke build following features are not ported yet: * ios fat libs * qtbase 3rdparty static dependencies WebEngine build can be skipped with setting QT_FEATURE_qtwebengine_build=OFF Note this patch needs follow up for 6.2 branch to disable qtpdf builds by default, since this should not part of qt 6.2 release. Task-number: QTBUG-95353 Change-Id: I4dd9f3934bdd478fb6d2fa686074a24d91f09953 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 79d04aa9e3e9aa84d7378260519f9e9a6759dc41) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use QList instead of QVectorJarek Kobus2020-07-151-1/+1
| | | | | | Task-number: QTBUG-84469 Change-Id: I666a060351f73783e15e3f96884c9393a5cd7e46 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Enum class QPdfPageRenderer::RenderModev5.15.0-beta2Allan Sandfeld Jensen2020-03-161-4/+4
| | | | | | | Avoid having the enum name in the enum values. Change-Id: Ida5b3405e6922eb1a2a37edc6fb650019254f4d4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add QPdfSearchModel, QML PdfSearchModel and PdfPageViewShawn Rutledge2020-01-233-0/+74
| | | | | | | | | | | | | | | | This enables searching a PDF for a text string and getting the boundaries of the areas where it is found. The boundaries are returned as polygons intended to be rendered with PathMultiline. PdfPageView is a QML component intended to be a drop-in viewer for use in applications that need the most common PDF viewing functionality. More advanced applications are free to use it as a starting point for customization. Task-number: QTBUG-77507 Task-number: QTBUG-77514 Change-Id: Id08ac30224e41b6cdfb9300cc4288d5750259f78 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_qpdfdocument: use QElapsedTimer instead of QTimeShawn Rutledge2019-11-251-2/+1
| | | | | Change-Id: Ifdac9ae6b216605166cefc9dbab60f5ab4b1dcbf Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add QtPdf and QtPdfWidgets modulesMichal Klocek2019-11-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds two new modules to qtwebengine repository. New modules do not depend on webengine module, however webengine chromium source code and Chromium "gn" configuration is required to build QtPdf. Adding two unrelated modules to webengine might look crazy: however sharing gn build configuration and Chromium code base with necessary qt adaptations simplifies code maintenance and minimises required code checkouts. Back porting of security patches for Chromium also affects Pdfium. Moreover, Pdfium is no longer a separate project, but integrated into Chromium: therefore moving it out of Chromium source tree would require extra effort. Rename webengine-core feature to build-qtwebengine-core, this makes consistent feature naming with build-qtpdf At the moment two new modules have integrated build, with possible shortcuts: qmake -- --no-build-qtwebengine-core qmake -- --no-build-qtpdf Webengine build is disabled by default now. Change-Id: Iac3d9927d51f3ac316db0148d275eda843dcc19b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Initial import of qtpdf source codeMichal Klocek2019-11-251-0/+0
| | | | | | | | | | | | | | | Code has been imported from git://code.qt.io/qt-labs/qtpdf to src/pdf, src/pdfwidgets, examples/pdfwidgets and tests/auto/pdf. Some git revision history was rewritten to remove conflicting files like src.pro, examples.pro, tests.pro, .gitingnore, .gitmodules, sync.profile, .qmake.conf, 3rdparty Removed unneeded leftovers after import. Change-Id: Ifc1e02828adfefe8db68d596cd2cb238de22408b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Add QPdfPageRenderer classTobias Koenig2019-11-254-1/+191
| | | | | | | | | | The QPdfPageRenderer renders a page of a QPdfDocument for a given zoom factor. Depending on its render mode, it does the rendering in the UI thread or a worker thread. Subsequent requests are queued and processed in order. Change-Id: I95820cd318cb443b2572f6d3db5a0bee53939bd1 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Add QPdfPageNavigation classTobias Koenig2019-11-254-1/+209
| | | | | | | | | | | | The QPdfPageNavigation class encapsulates the logic of navigating inside a QPdfDocument. It has the notion of a 'current' page and provides slots to navigate to the previous/next page or jump directly to a given page. Additionally it provides properties to indicate whether there is a previous or next page, relative to the current one. Change-Id: I053f3c49ab4a70b2610b64d96d2c274c3d0f629b Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix emission of QPdfDocument::pageCountChanged signalTobias Koenig2019-11-251-0/+31
| | | | | | | | Emit the signal whenever the amount of pages changes on loading/closing the document. Change-Id: I0555a9cad93cb1f125ded19889eda91e08725592 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add 'PageNumberRole' to QPdfBookmarkModelTobias Koenig2019-11-252-0/+25
| | | | | | | | Provide the referenced page of an bookmark entry through a model role. Change-Id: Ia1657d75acf0128389ef0de896b242b4e8df87fe Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* change the license to LGPLv3 (with the commercial option)Shawn Rutledge2019-11-252-5/+57
| | | | | | Change-Id: I2caed38ece8067ecdad877dcc278f7828a3cb0bb Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Add QPdfBookmarkModel classTobias Koenig2019-11-254-1/+254
| | | | | Change-Id: I000a398d2347870916bd93b290a1ddf5023fb0ce Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Refactor the state handling of QPdfDocumentTobias Koenig2019-11-251-22/+106
| | | | | | | | Introduce a status property, which describes the current status of the QPdfDocument during loading/closing workflow. Change-Id: I2c095c41cfaacb4cd325682def71f80ffe6ab6d9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add metaData() accessor method to QPdfDocumentShawn Rutledge2019-11-252-0/+28
| | | | | Change-Id: Ib25ae8940ff8a35627093031a82c1f25c7c940fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add passwordChanged() signal to QPdfDocumentTobias Koenig2019-11-251-0/+27
| | | | | | | | The passwordChanged() signal is emitted whenever the password on the document is changed. Change-Id: I8c35274dba7160b81555eac5bbda37d47cb8c9b7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add close() method to QPdfDocumentTobias Koenig2019-11-251-0/+68
| | | | | | | | | The close() method will close an open document and emit the aboutToBeClosed() signal, so that other component, which keep a pointer to QPdfDocument, can react to it. Change-Id: I93200eb0b4bf96479fc114b43c9f6f2af4d15ffa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Skip build of auto-test when print support is disabled in the Qt buildSimon Hausmann2019-11-251-1/+1
| | | | | Change-Id: I86bd5779ae4fee7dfba0b7a2121128120dbe3a5b Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
* Clean up the loadingSimon Hausmann2019-11-251-4/+11
| | | | Unify the load API and implementation to always go through FPDFAvail.
* Provide unit test for password protected PDFsSimon Hausmann2019-11-252-0/+11
|
* Keep reading until all pages are availableSimon Hausmann2019-11-251-2/+4
|
* Provide async loading through QNetworkReplySimon Hausmann2019-11-252-10/+36
|
* Allow loading documents synchronously from a QIODeviceSimon Hausmann2019-11-251-17/+32
|
* Added basic rendering and page size getterSimon Hausmann2019-11-251-2/+8
|
* Implement basic document loading from a fileSimon Hausmann2019-11-253-0/+54
|
* Re-organize the build system to turn this into a full-fledged moduleSimon Hausmann2019-11-251-0/+0