Commit graph

200 commits

Author SHA1 Message Date
Yuri Chornoivan c04ca1fa96 Fix minor EBN issues 2018-08-31 12:23:45 +03:00
Andre Heinecke d50c06df25 Add refresh widgets if underlying field changes
Summary:
If a field is updated because of a calculate form action /
a script execution, not only refresh the rendered pixmap but
also the corresponding formWidget.

Test Plan: Unittest in separate revision. Tested it manually, too.

Reviewers: #okular

Subscribers: aacid

Tags: #okular

Maniphest Tasks: T7805

Differential Revision: https://phabricator.kde.org/D10048
2018-02-22 00:12:34 +01:00
Albert Astals Cid 19b7e3c112 The work in this branch was sponsored by LiMux
give them some credit in the headers
2017-11-16 09:58:31 +01:00
Albert Astals Cid 2102843273 Use the undo stack to set the modified bit
This way it's much easier to track whether we are modified or not
2017-11-14 14:52:02 +01:00
Albert Astals Cid d2d7a880b1 Minor style adjustment 2017-11-06 09:28:04 +01:00
Albert Astals Cid 099d3cfcc8 Update @since to 1.3
Let's see if we can squeeze it in
2017-11-06 06:10:13 +01:00
Albert Astals Cid a93661e892 Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms 2017-09-27 15:01:57 +02:00
Albert Astals Cid ef7c9c67bf Implement continuous search
Show non-intrusive info messages whenever the search start over from the
beginning or the bottom of the document, instead of asking the user if
s/he wants to continue the search. This is consistent with search in
KWrite/Kate and with web browsers.

Based on work of and reviewed by Elvis Angelaccio
2017-09-26 23:27:25 +02:00
Albert Astals Cid 04ed10d3ea Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms 2017-09-11 19:51:51 +02:00
Kevin Funk a53a2402ca clang-tidy: modernize-use-nullptr run
Semi-ACK'd by Albert :)
2017-09-06 00:19:48 +02:00
Tobias Deiminger 0957abc39a Add annotation resize functionality
Usage:
If you left-click an annotation, it gets selected. Resize handles appear on the selection rectangle. When cursor is moved over one of the 8 resize handles on the corners/edges, the cursor shape changes to indicate resize mode. Everywhere else on the annotation means "move", just as it was before resize feature was added. Pressing ESC or clicking an area outside the annotation cancels a selection. Pressing Del deletes a selected annotation.

Feature is only applicable for annotation types AText, AStamp and AGeom.

Implementation:
It works by eventually changing AnnotationPrivate::m_boundary and notifying generator (i.e. poppler) about that change. Annotation state handling is shifted out of PageView into a new class MouseAnnotation (ui/pageviewmouseannotation.cpp). Some functionality not related to resizing but to annotation interaction in general is also shifted to class MouseAnnotation, to build a single place of responsiblity.

Other changes:
Add method Document::adjustPageAnnotation, backed by a QUndoCommand.
class Okular::AdjustAnnotationCommand.
Add Annotation::adjust and Annotation::canBeResized methods.
Draw resize handles in PagePainter::paintCroppedPageOnPainter.

Resize and move work
-for types AText, AStamp and AGeom
-on all pages of document
-when viewport position changes
-when zoom level changes
-for all page rotations (0°, 90°, 180°, 270°)

Selection is canceled
-when currently selected annotation is deleted
-on mouse click outside of currently selected annotation
-ESC is pressed

Viewport is shifted when mouse cursor during move/resize comes close to viewport border.
Resize to negative is prevented.
Tiny annotations are still selectable.
If mouse is moved over an annotation type that we can focus, and the annotation is not yet focused, mouse cursor shape changes to arrow.
If mouse cursor rests over an annotation A, while annotation B is focused, a tooltip for annotation A is shown.
Selected Annotation is deleted when Del is pressed.

Test for regressions:
-Annotation interaction (focus, move, resize, start playback, ...) are only done in mode EnumMouseMode::Browse.
-If mouse is moved over an annotation type where we can start an action, mouse cursor shape changes to pointing hand.
-If mouse is moved over an annotation type that we can't interact with, mouse cursor shape stays a open hand.
-If mouse cursor rests over an annotation of any type, a tooltip for that annotation is shown.
-Grab/move scroll area (on left click + mouse move) is prevented, if mouse is over focused annotation, or over AMovie/AScreen/AFileAttachment annotation.
-A double click on a annotation starts the "annotator".

REVIEW: 127366
BUG: 177778
BUG: 314843
BUG: 358060
2017-03-19 23:18:17 +01:00
Albert Astals Cid 91f092cdf4 Merge remote-tracking branch 'origin/Applications/16.12' 2017-02-01 00:50:29 +01:00
Albert Astals Cid 96d8953878 Fix Enter turning the thumbnail filter bar into a regular search bar
BUGS: 375755
2017-02-01 00:49:21 +01:00
Albert Astals Cid 021cc986a8 Merge remote-tracking branch 'origin/Applications/16.12' 2017-01-31 22:52:45 +01:00
Albert Astals Cid be6b0b6f48 Fix porting bug regarding the font extraction progress
BUGS: 375782
2017-01-31 22:50:54 +01:00
Elvis Angelaccio 3b610bd86a Fix wrong apidox
The duration argument is used as input of QTimer::start(),
which requires milliseconds and not seconds.

REVIEW: 129894
2017-01-29 18:30:03 +01:00
Alex Richardson 2f9246ae42 Port to new JSON plugin loading system
This means Okular can now work without ksycoca and KDELibs4Support.

REVIEW: 126193
2016-01-04 15:59:07 +01:00
Albert Astals Cid 8445660539 Merge remote-tracking branch 'origin/master' into frameworks 2015-10-18 22:29:00 +02:00
Albert Astals Cid 1cd101b480 Small cleanup of the layer support feature
Tab replacing, function naming, include removal, @since addition, etc
2015-09-15 01:38:09 +02:00
Saheb Preet Singh bf673495fb added layers on the left sidebar 2015-05-27 19:26:56 +05:30
Alex Richardson cfc82ee9b0 Be explicit about the target dependencies 2015-04-14 20:04:26 +01:00
Lukáš Tinkl fd6a35486e port KUrl -> QUrl 2015-01-29 20:55:57 +01:00
Montel Laurent 5da7c5f77d port to qCDebug. Autogenerate export headers 2014-10-27 22:35:06 +01:00
Montel Laurent 17b7049c69 Fix includes 2014-10-08 13:48:01 +02:00
Frederik Gladhorn e28dbc6c00 Port to QMime
compressedMimeFor now already does the inheritance check, so another
check was removed.
2014-09-11 16:32:43 +02:00
Fabio D'Urso e059d2652c core: support for migration of annots and forms out of docdata/ 2014-09-10 12:18:34 +02:00
Fabio D'Urso 288f87f1a5 Merge branch 'master' into dont-use-docdata-for-annots-and-forms
Conflicts:
	core/document.cpp
	core/document_p.h
	part.cpp
	part.h
2014-09-08 14:58:55 +02:00
Frederik Gladhorn b79e706e56 Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	generators/dvi/generator_dvi.cpp
	generators/ooo/generator_ooo.cpp
	part.cpp
	shell/main.cpp
	shell/shell.cpp
	shell/shell.h
	shell/shellutils.h
	tests/CMakeLists.txt
	ui/propertiesdialog.cpp
2014-08-14 13:35:43 +02:00
Albert Astals Cid e9e3d4a435 Make documentInfo be Hash based instead of XML based 2014-08-10 22:38:13 +02:00
Frederik Gladhorn a2f6a136b2 Fix some typos 2014-08-10 19:27:31 +02:00
Frederik Gladhorn 0c7a45c7a5 Disable lots of stuff and compile
The text generator is the only one compiled now.
This version links for me but then doesn't find its KPart on startup.

TTS has been completely disabled as well as some other things like the
about dialog.
2014-08-10 14:42:54 +02:00
Frederik Gladhorn 96b0e27c44 QAction, more includes fixed 2014-08-10 01:08:54 +02:00
Frederik Gladhorn 75031eee7e Fix includes 2014-08-08 01:59:55 +02:00
Fabio D'Urso 43a3756e1c Hot-swap backing file instead of reloading (if the generator supports it) 2014-05-11 18:52:15 +02:00
Fabio D'Urso eb6cd088d7 Fix non-PDF native file extraction from document archives 2014-05-11 18:52:13 +02:00
Albert Astals Cid 86dd9e8801 Move the ooo wallet code to use the part.cpp one
Less widgets in generators/core \o/
2014-05-10 15:54:03 +02:00
Albert Astals Cid 7b7fef0bea Move the messagebox about continuing search from core to ui 2014-05-10 11:33:21 +02:00
Albert Astals Cid e759c94224 let's call it searchid, goes for better searching :) 2014-05-10 10:27:59 +02:00
Albert Astals Cid 4c553ac87f small docu fix 2014-05-10 10:26:30 +02:00
Albert Astals Cid 630d3a8a5f Simplify search parameter passing 2014-05-10 00:49:01 +02:00
Albert Astals Cid e93d5bda01 Move KWallet code from pdf backend to ui
This helps with the widget dependency removal in the core/backends
2014-05-09 19:58:43 +02:00
Michal Humpula c07ee043a3 Multiple Tiles Managers per Page
It's straighforward implementation. Every single place, where there were call for (or with) TilesManager, now has a DocumentObserver as companion. The m_tiledManager reference in PagePrivate was changed to QMap<DocumentObserver, TilesManager>.

REVIEW: 113986
2014-02-19 23:41:22 +01:00
Jon Mease b7ce9114c5 Undo support for PDF forms
Together with the already commited support for undo in annotations fixes 177501
BUGS: 177501
REVIEW: 110589
FIXED-IN: 4.11.0
2013-06-03 22:46:41 +02:00
Albert Astals Cid d0fd156dc9 Minor tweaks 2013-04-06 00:28:39 +02:00
Jon Mease 78faf1e68f Add undo/redo support for annotations
REVIEW: 107442
2013-04-06 00:22:48 +02:00
Albert Astals Cid 541650a4f4 Remove the concept of observer/view id
Just use the pointer as id :-)

This is BIC and SIC, increase the soversion now to makes sure we don't forget in the future

Patch based in an earlier patch by Bogdan Cristea <cristeab@gmail.com>
REVIEW: 109115
2013-02-24 23:01:02 +01:00
Mailson Menezes 66e93136f9 Limit zoom to 400% if document doesn't support tiles 2012-11-15 20:24:51 -03:00
Tobias Koenig 563ad0458e Extend Document::processAction() to handle RenditionActions
REVIEW: 106608
2012-10-22 13:04:02 +02:00
Albert Astals Cid 4befd95ef8 sendGeneratorRequest -> sendGeneratorPixmapRequest 2012-09-25 11:09:34 +02:00
Albert Astals Cid d917fe1e12 Unify the forward and backward search methods
Same functionality 60 lines of duplicated code less to maintain
2012-09-25 00:14:10 +02:00