| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
The only not cover part in cmake port are:
* ios builds for qtpdf
* qt static dependecies for qpdf
Pick-to: 6.2
Change-Id: Iefe624c35d847b4a9c3cd970192487340b1657f9
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QtPdf and QtWebEngine builds are producing few libraries in one build.
This creates some corner cases like prl file generation. Paths
in prl files are replaced on installation with sed. Unfortunately this
will not work well if we build libraries which depends on not yet
installed libs, since prl files reused by build are not processed by sed.
Add workaround in this case so all depend libs are aware of their static
dependencies and generate correct prl files.
Task-number: QTBUG-85616
Change-Id: I0dbeb96bccbc4865dd52dea7c5d619f8cda1a596
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
TableView in Qt 6 adds its own versions of these functions, but we need
them now so that PdfMultiPageView can accurately jump back and forth
between specific locations and zoom levels.
Done-with: Richard Gustavsen
Task-number: QTBUG-83679
Change-Id: I895186feab572395af4c49b477b1695480a813df
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testing only on iOS so far; QtPdf doesn't work on Android because of
QTBUG-83459, so we can only hope that this might perhaps be cross-platform,
if only text selection handles actually existed on all platforms.
As usual, text selection begins with a long-press; the iOS platform
plugin intercepts that, and we get QInputMethodEvent::Cursor.
There is no cursor, but we use the opportunity to do hit-testing,
because the Cursor event is the only way that we receive the pixel
location where the user is interacting. Then a popover menu appears,
which contains Select and Select All, and either Copy or Paste depending
on the qt_im_readonly property workaround. You don't get handles until
you choose Select, which will select a word. That makes the popover
menu disappear. You can use the toolbar button to copy to the clipboard.
After that, you can drag either handle. inputMethodQuery(query, argument)
is only ever called with ImCursorPosition regardless which handle is
being dragged, so it doesn't make sense to change the selection there,
even though that would be easy if we were given that information.
Instead, the iOS platform figures out the character range for itself and
sends a QInputMethodEvent::Selection event to tell us which text to
select. And yet it still doesn't move the handles without being told:
QGuiApplication::inputMethod()->update(Qt::ImCursorRectangle | Qt::ImAnchorRectangle)
makes that happen. Then the popover menu will appear again, and now you
can use the Copy function on it as an alternative way to copy text to
the clipboard.
By default, when the user does the initial long-press to start selecting
text, the popover menu has Select, Select All, and Paste. In editable
controls there is a second possible menu that normally has Cut, Copy,
Paste and Delete. We are not able to enter that mode. So as a
workaround, to substitute Copy instead of Paste, we set the
qt_im_readonly property so that QIOSTextResponder::canPerformAction()
can detect it and make the substition. Of course that won't work
without the patch to 5.15; so you still get a useless Paste action on
earlier Qt versions.
Selecting a word via the Select popover menu item happens because iOS sends
QKeySequence::MoveToPreviousWord and then QKeySequence::SelectNextWord.
We spend time calling getSelectionAtIndex() twice because of that.
With an actual keyboard, it should be possible to use keystrokes to
extend the selection, but it doesn't seem to work yet with shift-arrows
on a physical bluetooth keyboard on iOS.
Select All on the popover menu works via inputMethodEvent() with attr
QInputMethodEvent::Selection. Copy sends the standard copy key sequence,
so keyReleaseEvent() handles it.
We must rename the geometryChanged signal to selectedAreaChanged now
that we're inheriting from QQuickItem, to avoid shadowing
QQuickItem::geometryChanged.
For this kind of text selection to work even when the rendering is scaled,
it became necessary to inform PdfSelection of the rendering scale; so
a renderScale property is added. Thus it is sensible (and a nice
simplification in QML code) to use it for the fromPoint and toPoint
properties, such that those are now expressed in pixels rather than points.
Fixes: QTBUG-82441
Task-number: QTBUG-83811
Change-Id: I16ecd2db55c6a834be6139ce4f3aae23446fed54
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: I5cdbedb5b20c32d1c7e3ed8e8a79490be2871a77
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
PdfPageView might be useful in some cases, but we need to get feature
parity with PdfMultiPageView as much as possible, including scrollbars.
Including them in the view is convenient, but also less flexible.
Change-Id: Ibbe6a090a5f5b1d340124986fe49672d682ddedb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
So far it's a ListView with a page per delegate. Many features are working,
but zooming and rotation are not working yet.
Change-Id: I9ee7aa60ad4411bd8734fe2cd987a68906a5cf57
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
| |
Works well enough to use, but needs autotests and at least one fix.
Change-Id: I2114b9fb3b5ddf7cfe2106d4a4fbc7d74852c61d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Internal links and web links populate the QALM, which can then
be used to drive a Repeater to position highlight rectangles
with TapHandlers, which will handle a click by jumping to the
link destination.
Fixes: QTBUG-77511
Change-Id: I3b5b96d6e82bfd578f31f631f24279173036a080
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|
|
|
|
|
|
|
|
| |
So now you can select text by mouse-drag and copy it to the clipboard.
Task-number: QTBUG-77509
Change-Id: I689ee4158974de8bc541c319a5a5cc2f8f3c2ae6
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
QQuickPdfDocument is a wrapper for QPdfDocument providing appropriate
QML API.
Task-number: QTBUG-77506
Change-Id: Ifa2ef50d3d31179f1955c2f673495e727b962bd1
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|