Commit Graph

482 Commits

Author SHA1 Message Date
Albert Astals Cid
becdc7c483 Revert the two last commits
f9841b0f8a and e0f45add55

They break the windows build, which shows there's something defenitely
fishy going on with the current code, but oh well, someone with more
time needs to figure out a proper solution
2020-11-11 01:31:47 +01:00
Albert Astals Cid
e0f45add55 Enable -Wweak-vtables in clang
Read https://stackoverflow.com/a/23749273/11956287 for a full
explanation, but basically this is important for headers like the
interfaces/ and kdocumentviewer.h that are supposed to be used by third
partyies where it may happen that wrong things happen because the whole
class is inline in a header

For the classes that are defined in the .cpp or are not installed
headers this would not be necessary but it's not so hard to add a few
default defined destructors, so do that :)
2020-11-08 21:21:06 +00:00
Albert Astals Cid
f44eceba76 GIT_SILENT Upgrade release service version to 21.03.70. 2020-11-08 18:40:16 +01:00
Albert Astals Cid
1327fdd830 GIT_SILENT Upgrade release service version to 20.11.80. 2020-11-08 17:53:23 +01:00
Simone Gaiarin
580cbce837 Selectively reparse builtin and quick annotation tool configuration 2020-10-28 05:32:07 +00:00
Laurent Montel
f7cc59b7dc Drop outdated QT_USE_FAST_OPERATOR_PLUS 2020-09-17 07:14:54 +02:00
Friedrich W. H. Kossebau
37bf29d57d Use ecm_setup_qtplugin_macro_names
Avoids all the explicit boilerplate needed, ensures the dependency on
the JSON file ia also set and allows simple export of the setup
in the installed CMake config file, so other projects importing
the config file have the respective CMake macros set as recommended.

Test Plan:
Still builds as before. Touch a plugin metadata JSON file now triggers a moc
rerun. CMake config file contains setup of variables.
2020-09-13 11:20:50 +02:00
Albert Astals Cid
c17127b018 cmake: suggest-override is provided by ECM since 5.55 2020-09-13 01:04:16 +02:00
Albert Astals Cid
e989200dcf Increase minimum supported versions to those provided by Ubuntu 20.04 2020-09-13 01:03:53 +02:00
Albert Astals Cid
d5210db504 Change the version to be date based
As discussed on the Akademy meeting, it's just simpler to do this than
keep pretending 1.10 vs 1.9 have some kind of meaning :)
2020-09-11 16:27:26 +00:00
Albert Astals Cid
2697105462 Revert cbddcd3273
KJS and KWallet are indeed optional, that's what the ${optionalComponents} variable does
2020-09-09 14:13:09 +02:00
Albert Astals Cid
cbddcd3273 kwallet and kjs are mandatory in cmake anyway, remove ifdefs 2020-09-05 23:50:45 +00:00
Albert Astals Cid
ee2ef4b0f2 Merge remote-tracking branch 'origin/release/20.08' 2020-07-13 01:16:38 +02:00
Albert Astals Cid
a73012a91c Cleanup part.rc files older than version 47
Otherwise we crash because we introduced a mandatory new toolbar and
kxmlgui doesn't seem to merge them properly

BUGS: 422827
2020-07-12 23:52:08 +02:00
Albert Astals Cid
4f3d1db584 increase version 2020-07-11 12:29:01 +02:00
Albert Astals Cid
8fef6098a1 GIT_SILENT Upgrade release service version to 20.11.70. 2020-07-11 12:27:08 +02:00
Albert Astals Cid
7044b0ddf3 GIT_SILENT Upgrade release service version to 20.07.80. 2020-07-11 11:54:57 +02:00
Albert Astals Cid
a3c7d81000 Merge remote-tracking branch 'origin/release/20.04' 2020-06-30 19:37:33 +02:00
Albert Astals Cid
795c7cb01f Increase kjs requirement for using the timeout check
Unfortunately with the new timeout code but older than 5.72 will crash on appAlert

So increase the requirement to > 5.71
2020-06-24 12:06:32 +02:00
Christoph Feck
1d80b278ff GIT_SILENT Upgrade release service version to 20.04.2. 2020-06-08 19:29:41 +02:00
Simone Gaiarin
0b05d7ce99 Overhaul annotations UX
Create a new new annotation toolbar to replace the current one as discussed in the task T8076.
Fixes:
BUG: 386578
BUG: 374728
BUG: 352310
BUG: 330518
BUG: 341914
BUG: 157289
BUG: 358057
BUG: 412767
BUG: 413595
BUG: 420462
FIXED-IN: 1.11.0

Test Plan
Before testing this revision
Delete or Temporary move aside the following files:

~/.config/okularpartrc
~/.config/okularrc
~/.local/share/kxmlgui5/okular/part.rc
~/.local/share/kxmlgui5/okular/shell.rc

Nomenclature
Actions in the main toolbar:

Quick annotations
Actions in the annotation toolbar:

Annotation actions Highlighter, Underline, Squiggle, Strike out, Typewriter,
Inline note, Popup note, Freehand line, Arrow, Straight line, Rectangle, Ellipse,
Polygon, Stamp

Annotation config actions Line width, Color, Inner color, Opacity, Font, Annotation settings

Other actions Add to Quick Annotations, Pin

Autotests

 First run: annotation toolbar is not visible

 Selecting Tools > Annotations shows the annotation toolbar (below the main toolbar by default)

 Select an annotation > toolbar is shown

 Select a quick annotation > toolbar is shown

 Hide action (red cross) on the toolbar hides the toolbar

 Keys 1-9,0 select the (builtin) Annotation actions (one case tested)

 Keys Alt+1-9,0 select the quick annotation actions (one case tested)

 No annotation action selected: Quick Annotations is enabled, Add to quick annotations is disabled, Annotation config actions are disabled, Pin is enabled

 The current document is an image: Highlighter, Underline, Squiggle, Strike out are disabled (also in Quick annotations)

 The current document is protected: All actions are disabled

 Select annotation: the  Annotation config actions are enabled and their values set to the ones for the current annotation (taken from okularpartrc)

 Click an annotation action when none selected: browse mode is selected

 Click the currently selected annotation action: the action is unchecked and the tool disabled (back to browse mode)

 Click ESC: the currently selected annotation action is unchecked

 If Pin unchecked the selected annotation is unchecked after it has be used once and we are back to Browse mode

 The annotation systems works when multiple Okular tabs are open (the selected annotation is per-tab)

Manual tests

(TODO) Check that kconf_update updates the key AnnotationTools to QuickAnnotationTools in ~/.config/okularpartrc

Color icon is a format-text-color (if inline note or typewriter) or format-stroke-color for all other annotations
All actions have tooltips (some change based on the fact that the icon is enabled or not)
If a custom Line Width or Opacity is set through the Annotation Settings dialog, its value appears as a new checked action in the Line width or Opacity menu
If a custom stamp is selected through the Annotation Settings dialog, its name or filename (without path) appears as a new checked action in the Stamp menu
In Configure Okular > Annotations it is only possible to configure the quick annotations. Modifying them here updates the Quick annotations list after clicking Apply

The current document is an image: Highlighter, Underline, Squiggle, Strike out are disabled in Quick annotations
The state of Pin action is remembered across Okular launches
Selecting a quick action selects the corresponding action and loads its config values (color, line width, ...)
Setting the color and fill color works for all annotations (to be tested carefully, can be problematic for typewriter and inline note given the different internal mechanism to store the color in the settings)
Test stamp annotation (handled differently from the rest of the annotations)

Merge Request: https://invent.kde.org/graphics/okular/-/merge_requests/105
2020-06-04 13:01:31 +00:00
Albert Astals Cid
daad6c9fa1 Silence some deprecation warnings we can't fix 2020-06-03 21:37:32 +00:00
Christoph Feck
d3dcf7a394 GIT_SILENT Upgrade release service version to 20.04.1. 2020-05-11 22:23:16 +02:00
Albert Astals Cid
26f8bb3279 GIT_SILENT increase version 2020-04-15 23:15:50 +02:00
Christoph Feck
5f9a2d85d4 GIT_SILENT Upgrade release service version to 20.04.0. 2020-04-15 10:38:01 +02:00
Albert Astals Cid
25b6775468 Use ${KF5_REQUIRED_VERSION} also for ECM 2020-04-08 21:56:29 +02:00
Friedrich W. H. Kossebau
2fa8080447 Ensure build dependency on JSON files using CMAKE_AUTOMOC_DEPEND_FILTERS
Also do needed setup for automoc in installed CMake config file.
2020-04-08 00:46:27 +02:00
Christoph Feck
aa1af3cf4f GIT_SILENT Upgrade release service version to 20.03.90. 2020-03-28 23:33:51 +01:00
Albert Astals Cid
c06f3c1557 GIT_SILENT Upgrade release service version to 20.03.80. 2020-03-15 19:58:44 +01:00
Albert Astals Cid
c1852b8ddb GIT_SILENT Increase version 2020-03-15 19:48:43 +01:00
Albert Astals Cid
61e155045b GIT_SILENT Upgrade release service version to 20.07.70. 2020-03-15 19:36:50 +01:00
Simone Gaiarin
31e2c29ef0 Set C++ minimum version to 14
Also set CXX_EXTENSIONS to OFF
2020-02-29 09:26:34 +01:00
Yuri Chornoivan
5c6a297feb Fix minor EBN issues 2020-02-13 11:47:51 +02:00
Harri Porten
c1afa356c0 Restrict time given for JavaScript evaluation to max. 2 seconds.
Possible improvement: alert the user of the timeout and offer
the option to continue or abort execution.
2020-02-11 22:34:46 +00:00
Albert Astals Cid
a96c082d69 Build desktop User Interface by default
Can choose to only build mobile interface or both
2020-02-06 22:26:00 +01:00
David Hurka
c6d937ab0d Replace ToolAction by ToggleActionMenu
Summary:
This replaces ToolAction by a near-drop-in replacement named ToggleActionMenu. The new annotation toolbar already uses this (D15580).

Unlike ToolAction, ToggleActionMenu inherits from KActionMenu to be more flexible.
* Menu can be set from outside, not hard coded.
* Default action for toolbar button is controllable from outside. (Theoretically, the button could trigger //anything// now.)
* KActionMenu instead of KSelectAction:
  - Pluggable in other menus, thus called “Menu”.
  - Doesn’t make the actions exclusive, so //any// actions can be added to the menu.
* ImplicitDefaultAction mode can choose the default action of the toolbar buttons automatically, by looking for the first checked action in the menu.

Toolbar buttons use the default action //of// this menu, not this menu itself as action.

Because the default action is configurable now, D21622 and D21635 (where we tried to fine-tune ToolAction) become obsolete.

Screenshot:
Everything like before, here with mouse_selecttool added to Tools menu to show submenu capability.
{F6884228}

Test Plan:
ToolAction replacement and ImplicitDefaultAction mode:
 * Open Okular and look at toolbar button -> has correct tool selected.
 * Open a document.
 * Look at toolbar button menu -> Correct menu entries (like before, with ToolAction).
 * Select some selection tools through shortcuts and toolbar button -> behaves correctly.
Usage as submenu:
 * Add ToggleActionMenu ("mouse_selecttool") to menubar (..../kxmlgui5/okular/part.rc) -> Submenu looks correctly, has no checkbox attached and so on...
Toolbar buttons:
 * Add diverse other actions to the menu -> still works as before.
 * Add actions when toolbar buttons are already created -> actions are added to existing buttons.
 * setDefaultAction() to some completely unrelated action. -> ToggleActionMenu does not get confused.

Reviewers: simgunz

Reviewed By: simgunz

Subscribers: aacid, ngraham, simgunz, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D21971
2020-02-02 01:33:33 +01:00
Albert Astals Cid
be8e5710d4 Require poppler >= 0.62
It's the one that comes with our "minimum" requirement Ubuntu 16.04

Cleans up the code a bit
2020-01-09 00:01:43 +00:00
Jonathan Riddell
3403a16f42 Change KDE_APPLICATIONS_VERSION to RELEASE_SERVICE_VERSION https://phabricator.kde.org/T11933
GIT_SILENT
2019-12-10 16:56:25 +00:00
Albert Astals Cid
b8ff7608f2 increase version
GIT_SILENT
2019-11-10 01:18:11 +01:00
Albert Astals Cid
10f602762b GIT_SILENT Upgrade KDE Applications version to 20.03.70. 2019-11-10 01:15:59 +01:00
Nicolas Fella
0110d2f584 [android] Use filedialog from Qt
(cherry picked from commit 187c474024)
2019-11-03 07:44:38 +13:00
Albert Astals Cid
2555954228 Merge remote-tracking branch 'origin/Applications/19.08' 2019-08-08 19:13:28 +02:00
Albert Astals Cid
fe5e467d71 GIT_SILENT Increase version number 2019-08-08 19:12:03 +02:00
Christoph Feck
ccbd797580 GIT_SILENT Upgrade KDE Applications version to 19.07.90. 2019-07-29 15:48:05 +02:00
João Netto
7555212d29 Implemented the getOCGs and OCGs methods to support layer changing by JavaScript.
Implemented more unit tests to cover the OCGs
2019-07-20 12:04:59 +02:00
João Netto
cc10164d34 Implemented initial support for animatedPDF
When refreshing, widgets must check if they should be visible

Implemented unit tests to the JavaScript functions.
2019-07-20 12:04:45 +02:00
Albert Astals Cid
aec76a6752 GIT_SILENT Upgrade KDE Applications version to 19.11.70. 2019-07-15 21:43:08 +02:00
Albert Astals Cid
24e66a250b GIT_SILENT Upgrade KDE Applications version to 19.07.80. 2019-07-15 21:21:18 +02:00
Albert Astals Cid
10cfe6c23e Increase cmake requirement to 3.5
It's what KF5 uses since a while and we kind of agreed it was old-enough
looking at https://repology.org/metapackage/cmake/badges
2019-07-04 19:45:51 +02:00
Albert Astals Cid
5e6649c3b1 Increase Qt deendency to Qt 5.9
It's LTS and reading https://repology.org/project/qt5/badges it's not
like many distros ship Qt 5.8 anyway
2019-07-04 00:40:56 +02:00
Laurent Montel
a262fa194d Install in new logging directory when we use kf5 5.59.0 2019-06-12 06:58:00 +02:00
Michael Weghorn
8bf1a91175 Add option to ignore print margins for non-PDF generators
Summary:
This adds a combobox in the print dialog of the non-PDF
generators to allow selecting whether or not to take
print margins into account.

For the PDF case and rasterized printing, new print otions have
been implemented in commit 2e97d58750
already, which adds an additional option to do no scaling at all.

For consistency reasons, the same terms also used for the PDF
case are used in the combobox (i.e. the two of the three that
apply).

This adds a new abstract class 'PrintOptionsWidget' with a
'ignorePrintMargins()' method to indicate whether print margins
should be ignored or not, and a default implementation.
The existing widget for the PDF generator now derives from this
class.

In order to avoid an ABI breakage, the return value of
'Document::printConfigurationWidget' is left as a 'QWidget *'
and a dynamic_cast is done on use.

FilePrinter is adapted to take into account the value set by
'QPrinter::setFullPage()' and the margin options
are now passed accordingly (either the values set in the dialog or '0').

A big thanks to Albert Astals Cid <aacid@kde.org> for showing how
to extend the initial implementation to cover more generators.

Test Plan:
1) Open a PostScript file in Okular (using a document size that matches
  a paper size available on the printer used later makes it easier
  to see things behave as expected)

2) open print dialog, go to "Print options" and notice that there is a new
  "Scale mode" combobox whose value is set to "Fit to printable area"
   by default.

3) don't change any options, print to a printer that has hardware margins

Expected result: the document is scaled to the printable area (e.g.
scaled down so that the printer's hardware margins remain empty) as it
has been without this change.

4) Set the value of the "Print Options" -> "Scale mode" combobox to
   "Fit to full page" and print again

Expected result: The document is scaled to the full page size, i.e. ignoring
the printer's hardware margins.

5) Try steps 1-4 with other document formats supported by Okular and
   observe that they behave the same (except for the PDF case, where
   there's a combobox with three options that has been implemented
   independent of this change).

Reviewers: #okular, ngraham

Reviewed By: ngraham

Subscribers: fvogt, rkflx, arthurpeters, ltoscano, okular-devel, aacid, ngraham

Tags: #okular

Differential Revision: https://phabricator.kde.org/D10974
2019-04-03 08:00:35 -06:00
Albert Astals Cid
6bfdff58ae GIT_SILENT Upgrade KDE Applications version to 19.07.70. 2019-03-16 22:14:47 +01:00
Albert Astals Cid
b78a2578ae increase devel version 2019-03-16 22:14:40 +01:00
Chinmoy Ranjan Pradhan
a234a902dc Implement digital signature support for PDF
This is a squash of the original branch

It also contains fixes/rework from Albert Astals Cid

If you're interested in its history have a look at the
gsoc2018_digitalsignature branch

The poppler dependency situation is:
 * With 0.51 you get most signature information
 * With 0.68 you also get signature location/reason information
 * With 0.73 you also get signature certificate information
2019-01-10 23:13:54 +01:00
Aleix Pol
ff2f60754d Properly find the Purpose framework
Now that we require KF5 5.44

Reviewers: #okular, aacid

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D16544
2019-01-07 00:56:08 +01:00
Albert Astals Cid
3513aea5bf Increase KF5 requirement to 5.44 2019-01-07 00:56:08 +01:00
Albert Astals Cid
88778d5436 GIT_SILENT Upgrade KDE Applications version to 19.03.70. 2018-11-10 08:40:14 +01:00
Albert Astals Cid
4a06e29d71 GIT_SILENT Upgrade KDE Applications version to 18.03.70. 2018-11-09 23:38:17 +01:00
Albert Astals Cid
8394e9722f New version for master
GIT_SILENT
2018-11-09 23:25:19 +01:00
Albert Astals Cid
1503463958 GIT_SILENT Upgrade KDE Applications version to 18.11.70. 2018-07-16 20:02:01 +02:00
Albert Astals Cid
c05ebf2fc8 Increase version 2018-07-16 19:30:39 +02:00
Laurent Montel
634d8db004 Add missing () 2018-07-09 07:43:44 +02:00
Laurent Montel
fd44517bae Honor BUILD_TESTING 2018-07-09 07:37:58 +02:00
Friedrich W. H. Kossebau
2d8179fdcb Remove usage of dead QT_USE_FAST_CONCATENATION
Dropped pre-Qt5
2018-06-29 19:45:56 +02:00
Aleix Pol
1fb77446a7 Make it possible to disable the build of okularkirigami
Summary:
Some distros seem to have the option.

BUG: 393119

Test Plan: Still builds, can disable build

Reviewers: #okular, mart, aacid, lbeltrame

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12352
2018-04-22 22:23:11 +02:00
Aleix Pol
77049d3b80 Android: include metadata for okular kirigami
Summary:
Include an AndroidManifest.xml file so when it's installed it has a
proper icon and name.
Include appdata information so it can be listed

Reviewers: #okular, mart, aacid

Reviewed By: #okular, mart, aacid

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12299
2018-04-19 01:05:54 +02:00
Aleix Pol
c325b342f3 Make some frameworks optional so okular can be built on Android
Summary:
Disables KWallet integration if there's no KWallet, KJS if there's no
KJS and KDocTools.
Here's a list of frameworks that don't work on Android:
https://cgit.kde.org/sysadmin/ci-tooling.git/tree/local-metadata/project-ignore-rules.yaml

Test Plan: Still works locally, ran Okular and Okular Mobile on Android.

Reviewers: #okular, aacid

Subscribers: aacid

Tags: #okular

Differential Revision: https://phabricator.kde.org/D12177
2018-04-16 22:41:19 +02:00
Aleix Pol
621e4d9cd7 Improve searching for KActivities 2018-04-13 17:35:17 +02:00
Aleix Pol
c8b0677a25 Remove unneeded dependencies 2018-04-13 17:05:16 +02:00
Albert Astals Cid
3e25263d77 Use KCrash 2018-04-08 11:50:18 +02:00
Albert Astals Cid
1069b02fd3 Merge remote-tracking branch 'origin/Applications/18.04' 2018-03-21 00:31:27 +01:00
Albert Astals Cid
7e1832c57a autotests: Only compile parttest if you have the pdf support
I'm sure other tests fail to run too, but this one was failing to
compile :D
2018-03-21 00:31:05 +01:00
Albert Astals Cid
33768c683f Merge remote-tracking branch 'origin/Applications/18.04' 2018-03-20 23:38:01 +01:00
Albert Astals Cid
098a886ff1 Increase OkularCore soversion
Since we broke ABI since last release
2018-03-20 23:37:30 +01:00
Albert Astals Cid
1b57c7557b GIT_SILENT Upgrade KDE Applications version to 18.07.70. 2018-03-19 23:52:08 +01:00
Albert Astals Cid
e6860a1194 GIT_SILENT Upgrade KDE Applications version to 18.03.80. 2018-03-19 23:37:57 +01:00
Albert Astals Cid
1a093dc572 New version for master 2018-03-19 23:36:23 +01:00
Andre Heinecke
cead2bbef3 Add initial support for built-in javascript functs
Summary:
This starts by adding support for AFSimple_Calculate which
is the standard "calculate" function in Adobe Acrobat Pro.

Reviewers: #okular

Subscribers: aacid

Tags: #okular

Maniphest Tasks: T7805

Differential Revision: https://phabricator.kde.org/D10049
2018-02-22 00:12:44 +01:00
Andre Heinecke
d3a549ca25 Add JavaScript Event Object handling
Summary:
This adds a new data object "Event" that can be used
to carry information in and out of JavaScript execution
contexts. The Event Object is defined in the Adobe JavaScript
scripting reference.

The implementation now adds handling for the FieldCalculate
Event. It should be extensible enough so that in the future
more events could be supported.

Reviewers: #okular

Subscribers: aacid

Tags: #okular

Maniphest Tasks: T7805

Differential Revision: https://phabricator.kde.org/D10073
2018-02-22 00:11:20 +01:00
Albert Astals Cid
879f40e3a8 Increase minimum required KF5 version
All the distributions tracked in repology.org that ship Qt 5.8 at least ship KF 5.33 so increase it to that version
2018-02-21 21:31:28 +01:00
Aleix Pol
e06883d102 Fix annoying warning
Summary:
Warning for every plugin was:
The file includes the moc file "generator_tiff.moc", but does not contain a Q_OBJECT, Q_GADGET, Q_NAMESPACE, K_PLUGIN_FACTORY_WITH_JSON, K_PLUGIN_FACTORY, K_PLUGIN_FACTORY_WITH_JSON or K_PLUGIN_FACTORY macro.

Test Plan: Built

Reviewers: aacid

Reviewed By: aacid

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D10022
2018-02-06 00:38:50 +01:00
David Faure
ee2418be1d Re-enable -DQT_NO_URL_CAST_FROM_STRING and fix the CHM backend. 2017-12-05 09:48:40 +01:00
Albert Astals Cid
80b1b67ab9 Merge remote-tracking branch 'origin/Applications/17.12' 2017-12-05 01:00:51 +01:00
Albert Astals Cid
26367babb4 Unbreak compilation of the chm backend
CCMAIL: faure@kde.org
2017-12-05 00:57:04 +01:00
Albert Astals Cid
2b7b8e94f8 We broke ABI by adding a new virtual to generator 2017-12-05 00:53:34 +01:00
Albert Astals Cid
deb01dce88 Increase version now that we're not on unstable versioning anymore 2017-12-05 00:30:48 +01:00
Christoph Feck
2f77b3294d GIT_SILENT Upgrade KDE Applications version to 17.12.0. 2017-12-05 00:03:16 +01:00
David Faure
591f200f33 Merge branch 'Applications/17.12' 2017-12-02 21:13:35 +01:00
David Faure
711e4e75ef Enable -DQT_NO_URL_CAST_FROM_STRING and fix compilation 2017-12-02 21:12:47 +01:00
Christoph Feck
27b8c8cc27 GIT_SILENT Upgrade KDE Applications version to 17.11.90. 2017-11-30 22:20:28 +01:00
Albert Astals Cid
7d5ee41f30 We need Qt 5.8
Because of QUndoStack::resetClean
2017-11-16 15:26:24 +01:00
Albert Astals Cid
43cd93a36b GIT_SILENT Upgrade KDE Applications version to 18.03.70. 2017-11-13 09:03:34 +01:00
Albert Astals Cid
a3d1bb8cad Increase version for next release 2017-11-13 01:08:51 +01:00
Albert Astals Cid
41d378aef9 GIT_SILENT Upgrade KDE Applications version to 17.11.80. 2017-11-13 01:07:57 +01:00
Kevin Ottens
a5da013a4d Add a "share" menu to Okular
Summary: This is implemented using the Purpose framework.

BUG: 173896

Reviewers: aacid

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8244
2017-10-18 16:55:21 +02:00
Albert Freeman
1f6e8a4782 Custom background color
Summary:
BUG: 182994

Adds an option to the config dialog that enables background color (the color around the displayed page) to be changed (while by default preserving the Qt toolkit selection as not to affect existing users).

Reasons for this change:
Accessibility, eye strain, aesthetic reasons, color displayed on monitor can affect power consumption (how: depends on display technology).
Many people want this change occording to Bugzilla and other sources.

Maintenance: Nearly no additional maintenance:
This is no new subsystem but a trivial feature with no complex code dependencies, and we are already showing a colour selection dialog and setting colours in other places in Okular.

{F4257766}

Other less important information:
https://git.reviewboard.kde.org/r/130219/
https://mail.kde.org/pipermail/okular-devel/2017-September/025520.html

Test Plan:
Tested everything, it all works:
Toggled the custom background color, changed custom background color, removed okular settings file (with: "rm ~/.config/okular*") to verify it uses the usual qt theme colour by default (where the settings file remembered the custom color).

Reviewers: #okular, aacid, elvisangelaccio, rkflx, ngraham

Reviewed By: ngraham

Subscribers: aacid, ltoscano, ngraham

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8051
2017-10-01 11:31:59 +02:00
Luigi Toscano
d176914e63 Revert "Custom background color"
Wrong authorship for the commit. Commit it again with the correct
information.

CCMAIL: pointedstick@zoho.com
This reverts commit 6b5a7c9a1a.
2017-10-01 11:27:53 +02:00
Nathaniel Graham
6b5a7c9a1a Custom background color
Summary:
BUG: 182994

Adds an option to the config dialog that enables background color (the color around the displayed page) to be changed (while by default preserving the Qt toolkit selection as not to affect existing users).

Reasons for this change:
Accessibility, eye strain, aesthetic reasons, color displayed on monitor can affect power consumption (how: depends on display technology).
Many people want this change occording to Bugzilla and other sources.

Maintenance: Nearly no additional maintenance:
This is no new subsystem but a trivial feature with no complex code dependencies, and we are already showing a colour selection dialog and setting colours in other places in Okular.

{F4257766}

Other less important information:
https://git.reviewboard.kde.org/r/130219/
https://mail.kde.org/pipermail/okular-devel/2017-September/025520.html

Test Plan:
Tested everything, it all works:
Toggled the custom background color, changed custom background color, removed okular settings file (with: "rm ~/.config/okular*") to verify it uses the usual qt theme colour by default (where the settings file remembered the custom color).

Reviewers: #okular, aacid, elvisangelaccio, rkflx, ngraham

Reviewed By: ngraham

Subscribers: aacid, ltoscano, ngraham

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8051
2017-09-30 19:45:24 -06:00
Henrik Fehlauer
fcc08449b1 Fix building synctex 1.19 on Windows
Summary:
The massive changes to the synctex code in D7594 pulled in a new library
(on windows only), reflect that in the linker flags.

Test Plan:
`craft okular` on Okular's master branch builds successfully with MSVC
2017 and Qt 5.9, build on Linux still fine.

Reviewers: #okular, aacid

Reviewed By: #okular, aacid

Tags: #okular

Differential Revision: https://phabricator.kde.org/D7809
2017-09-13 23:47:35 +02:00
Kevin Funk
a2bb8fbb46 Fix CMake warning
CMake Warning (dev) at
/home/kfunk/devel/install/kf5/share/ECM/modules/ECMPackageConfigHelpers.cmake:84
(message):
  Your project already requires a version of CMake that includes the
  find_dependency macro via the CMakeFindDependencyMacro module.  You
should
  use CMakePackageConfigHelpers instead of ECMPackageConfigHelpers.
2017-09-05 10:59:27 +02:00
Heiko Becker
29ddae55b5 Merge remote-tracking branch 'origin/Applications/17.08' 2017-09-04 21:37:14 +02:00
Heiko Becker
075b8153af Search for Kirigami
Summary: Makes it a bit more obvious that Kirigami is needed at runtime.

Test Plan: Shows a nice status message

Reviewers: #okular, aacid

Tags: #okular

Differential Revision: https://phabricator.kde.org/D7241
2017-09-04 21:32:19 +02:00
Albert Astals Cid
4c3fb21b0a Use project() to set the version 2017-09-02 19:57:46 +02:00
Albert Astals Cid
d1b0e6d68a GIT_SILENT Upgrade KDE Applications version to 17.08.1. 2017-09-02 11:32:08 +02:00
Albert Astals Cid
56849e7092 GIT_SILENT Upgrade KDE Applications version to 17.08.0. 2017-08-08 20:19:03 +02:00
Christoph Feck
2df84c4cb4 GIT_SILENT Upgrade KDE Applications version to 17.07.90. 2017-07-31 01:56:45 +02:00
Albert Astals Cid
8ecba7f6c9 GIT_SILENT Upgrade KDE Applications version to 17.07.80. 2017-07-17 22:16:44 +02:00
Albert Astals Cid
6f758f7477 1.3.x for master 2017-07-17 20:38:34 +02:00
Albert Astals Cid
bb547c5eed 1.2.x for KDE Applications 17.08.x 2017-07-17 20:37:44 +02:00
Albert Astals Cid
73e71ec383 GIT_SILENT Upgrade KDE Applications version to 17.11.70. 2017-07-17 20:35:15 +02:00
Andreas Sturmlechner
1177c2e1a8 Merge branch 'Applications/17.04' 2017-04-23 00:11:28 +02:00
Andreas Sturmlechner
decb01292e Drop unused DBusAddons
REVIEW: 130099
2017-04-22 12:55:37 +02:00
Albert Astals Cid
b23df4ef98 GIT_SILENT Update version 2017-04-12 14:33:35 +02:00
Albert Astals Cid
53c9eda733 GIT_SILENT Upgrade KDE Applications version to 17.04.0. 2017-04-12 13:41:25 +02:00
Albert Astals Cid
ecbfe4151e GIT_SILENT Upgrade KDE Applications version to 17.03.90. 2017-04-05 21:57:09 +02:00
Albert Astals Cid
3df3c758c8 GIT_SILENT Upgrade KDE Applications version to 17.03.80. 2017-03-20 23:47:03 +01:00
Albert Astals Cid
a0595e97df GIT_SILENT increase version a bit 2017-03-20 23:38:05 +01:00
Albert Astals Cid
f95952e95c GIT_SILENT Upgrade KDE Applications version to 17.07.70. 2017-03-20 23:21:26 +01:00
Albert Astals Cid
63a08bc01a Enable -Wsuggest-override 2017-03-19 23:27:04 +01: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
Oliver Sander
3859fba07d Remove dependency on KActivities on Windows.
REVIEW: 130022
REVIEW: 126378
2017-03-18 01:58:47 +01:00
Christoph Feck
7a013e3869 Require KHtml only when building CHM generator
Reviewed by: aacid

Differential Revision: D4507
2017-02-10 02:57:06 +01:00
Albert Astals Cid
61fdea2c1f Merge remote-tracking branch 'origin/Applications/16.12' 2016-12-28 19:38:22 +01:00
Albert Astals Cid
e833b3ce65 Fix menu titles not showing up
QMenu title/section are optional to draw from the style side but we have crucial information in them
so reuse old KMenu code to create a fake action that behaves as title

I'll see if KF5 wants to accept this as contribution later

BUGS: 374079
2016-12-28 17:05:46 +01:00
Albert Astals Cid
a3e0e630e2 Update version
GIT_SILENT
2016-12-09 23:00:22 +01:00
Albert Astals Cid
6e1d3bb1bc GIT_SILENT Upgrade KDE Applications version to 16.12.0. 2016-12-06 20:57:55 +01:00
Albert Astals Cid
d248be4173 GIT_SILENT Upgrade KDE Applications version to 16.11.90. 2016-11-29 22:16:51 +01:00
Albert Astals Cid
306ca5f77b GIT_SILENT Increase version for master 2016-11-16 00:38:08 +01:00
Albert Astals Cid
235c43fc47 GIT_SILENT Upgrade KDE Applications version to 17.03.70. 2016-11-16 00:19:13 +01:00
Albert Astals Cid
7cddd9c359 GIT_SILENT Upgrade KDE Applications version to 16.11.80. 2016-11-15 23:49:21 +01:00
Albert Astals Cid
fa680b6c04 Require Qt 5.6
This is not a dependency freeze break, it's just bringing cmake up to date with what the code already required

BUGS: 372339
2016-11-15 00:24:42 +01:00
Aleix Pol
ebeeac8d72 Set the version to 1.0
Remove redundant version.h file in favor of the ecm-generated.
Use minor version from KDE_APPLICATIONS_VERSION_*

Reviewed by Albert Astals
2016-10-29 12:42:59 +02:00
Martin T. H. Sandsmark
5e77764ac5 Don't show mobile version in menus 2016-08-13 22:53:29 +02:00
Martin T. H. Sandsmark
ff274fdecc Remove kdelibs4support 2016-08-13 22:38:02 +02:00
Martin T. H. Sandsmark
85078160fa Use normal KDE compiler settings 2016-08-13 22:32:31 +02:00
Olivier CHURLAUD
411bdee0eb Open relative path again
REVIEW: 128507
2016-08-03 16:01:30 +02:00
Martin T. H. Sandsmark
68deb82a6f We need doctools 2016-07-24 23:44:49 +02:00
Martin T. H. Sandsmark
077258f235 (re-)Implement recoloring 2016-07-24 21:34:56 +02:00
Olivier CHURLAUD
ef6f5ebc3b Porting more files out of KDialog 2016-07-21 21:53:54 +02:00
Olivier CHURLAUD
630269a400 More ports out of KDialog 2016-07-17 02:28:57 +02:00
Olivier CHURLAUD
741c616c7a Port most of part.cpp out of KDELibsSupport
minor: Change header cases : <qicon.h> becomes <QIcon>
2016-07-15 21:14:50 +02:00
Martin T. H. Sandsmark
a1d2d8cac7 Undo mistake in last commit 2016-07-11 19:41:37 +02:00
Martin T. H. Sandsmark
243fc02cb9 Add some missing explicit dependencies 2016-07-11 19:40:49 +02:00
Thomas Friedrichsmeier
df0c41212f Fix build with MinGW on Windows.
REVIEW: 127328
2016-03-16 10:57:34 +01:00
Armin K
568079625d cmake: Port to FindPoppler from extra-cmake-modules
REVIEW: 127049
2016-03-08 19:54:21 +01:00
Albert Vaca
67f69c8871 Merge branch 'master' into frameworks
# Conflicts:
#	CMakeLists.txt
#	active/app/package/metadata.desktop
#	conf/widgetannottools.cpp
#	core/version.h
#	generators/poppler/libokularGenerator_poppler.desktop
#	generators/txt/libokularGenerator_txt.desktop
#	generators/xps/libokularGenerator_xps.desktop
#	ui/annotationwidgets.cpp
#	ui/presentationwidget.cpp
2016-02-22 03:50:54 -08:00
Aleix Pol
f42a3bad65 Drop libkscreen dependency
Drops the x11 fallback. We were falling back to QX11Extras that were in
fact using QScreen internally.
Also remove the QDesktopWidget fallbacks for the same reason.
Drops some API for fetching the dpi and unifies it with ::realDpi(QWidget).

Based on Sebas's patch.
Reviewed by Albert.

REVIEW: 126913
2016-01-30 18:15:07 +01:00
Patrick Spendrin
37d5623102 Remove kdelibs4support from the generator plugins
This removes kdelibs4support for all generators except the mobipocket one.
The test executable for kimgio needs some windows fixes too, so I'll try
to make a separate review for that.

REVIEW: 126375
2016-01-30 16:51:46 +01:00
Albert Astals Cid
db1c8ad751 Need new KF5 to get KPluginMetaData::mimeTypes 2016-01-30 16:49:37 +01:00