Commit graph

41 commits

Author SHA1 Message Date
Albert Astals Cid 19d98d6a74 Run clang-format
find . \( -name "*.cpp" -or -name "*.h"  -or -name "*.c"  -or -name "*.cc" \) -exec clang-format -i {} \;

If you reached this file doing a git blame, please see README.clang-format (added 2 commits in the future of this one)
2020-07-11 09:17:33 +02:00
Albert Astals Cid 4c150c2889 Disable the overloaded-signal in two signals in TextDocumentGenerator
We already have a TODO for when we can do BIC changes
2020-07-09 21:38:29 +02:00
Albert Astals Cid 95e19450c9 Enable clazy fully-qualified-moc-types 2020-02-20 10:59:54 +01:00
Albert Astals Cid c549acaab0 Move the Q_PRIVATE_SLOTS to lambda connections
Some of the invokeMethods with a queued connection get changed with a
QTimer::SingleShot with 0 which has the same behaviour
2019-12-20 16:42:58 +01:00
Albert Astals Cid 78cf6bd910 CI: enable more modernize checks
Since unfortunately some of the autogenerated includes don't pass the
checks we do a trick of building out of source and then specifying the
.*/okular/.* path as the only includes we care about
2019-12-18 12:51:13 +01:00
Albert Astals Cid fe0c8ad7c9 MarkDown: Enable option to disable smartypants formatting
BUGS: 404616

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D19405
2019-03-30 23:51:00 +01:00
Yuri Chornoivan 614f580b79 Fix minor typos 2019-01-11 09:09:34 +02:00
Yuri Chornoivan 69c7b834d1 Fix minor API docs EBN issues 2018-10-19 09:00:06 +03:00
Albert Astals Cid 2d8b2c7e95 Add support for cancellable image rendering and text extraction
Summary:
Only supported by the pdf backend if using poppler >= 0.63

Sadly had to change the generator API

Text cancellation is a bit wobbly still since poppler has large parts
of the code where doesn't check for the cancellation flag, but that
is something that will get automagically fixed for us if the poppler
side is improved

Test Plan: Needs https://bugs.freedesktop.org/show_bug.cgi?id=104263

Reviewers: ervin, rkflx

Reviewed By: ervin, rkflx

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D9328
2018-02-01 22:53:28 +01:00
Albert Astals Cid afd3a1423a Make it clear that the caller to convert takes ownership 2017-08-25 01:17:31 +02:00
Albert Astals Cid 4072eb0c3a Add override 2017-03-02 20:38:50 +01:00
Montel Laurent 5da7c5f77d port to qCDebug. Autogenerate export headers 2014-10-27 22:35:06 +01:00
Frederik Gladhorn dad6936896 Bring back the txt generator 2014-09-17 23:52:52 +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 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
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
Fabio D'Urso a79351212d Removed TextDocumentGenerator::generalSettingsWidget()
Which is now useless because with the previous patch
TextDocumentGenerator no longer caches the widget.
2013-06-07 00:44:56 +02:00
Fabio D'Urso 3dd3a000db Don't crash if Configure Backends is opened again after it's been closed 2013-06-07 00:26:05 +02:00
Azat Khuzhin 1fdb0a0a06 Font selector for TextDocumentGenerator
REVIEW: 109021
2013-05-18 16:03:33 +02:00
Pino Toscano c05523da2b fix #include paths in core headers to other core headers to be relative
... and with double quotes brackets, so they can properly include each other without relying on the compiler include path
2011-06-01 10:51:31 +02:00
Pino Toscano 0c1ff7f350 new method/signal for okular 0.7 (kde 4.1)
svn path=/trunk/KDE/kdegraphics/okular/; revision=775126
2008-02-14 23:23:14 +00:00
Pino Toscano 7266660c37 Add a protected TextDocumentGenerator* generator() to the TextDocumentConverter to make it able to use stuff of the Document (eg a parent for dialogs).
svn path=/trunk/KDE/kdegraphics/okular/; revision=775125
2008-02-14 23:19:24 +00:00
Pino Toscano c6b7cfab8c Add a addMetaData(DocumentInfo::Key, QString) signal to the TextDocumentConverter.
This way, standard info keys can be used without adding manually the key id and the translated label.

svn path=/trunk/KDE/kdegraphics/okular/; revision=772350
2008-02-08 14:13:55 +00:00
Pino Toscano a194acf2bc Foo/FooPrivate for TextDocumentConverter
svn path=/trunk/KDE/kdegraphics/okular/; revision=746277
2007-12-08 14:45:32 +00:00
Pino Toscano 6aa123656a Port the plugin system to the standard KDE factory and loader, getting rid of the custom system okular had so far.
This requires a generator to have a
  MyGenerator(QObject *parent, const QVariantList &args)
constructor in order to be successfully loaded.
The OKULAR_EXPORT_PLUGIN macro was adapted, and the generators to provide it the about data; the protected Generator::setAboutData() is no more needed.

Remove the 'lib' prefix from plugins, unneeded now.

CCMAIL: okular-devel@kde.org

svn path=/trunk/KDE/kdegraphics/okular/; revision=744169
2007-12-02 20:57:24 +00:00
John Layt 070285e039 Port from KPrinter to QPrinter, remove dependency on KDE4_KDEPRINT_LIBS.
*** Note this is not a complete port, most of the generators use the 
printFiles method which Qt 4.3 does not support, these have simply
been commented out until we find a solution.  At least it removes
the dependency so we can remove from kdelibs.

svn path=/trunk/KDE/kdegraphics/okular/; revision=725660
2007-10-15 23:01:27 +00:00
Pino Toscano 15155d8824 Rename the virtual closeDocument() to doCloseDocument(), and make it protected.
Added a non-virtual closeDocument() in the base Generator class: this way, particular closing routines can be implemented in the "low level" of a generator.
Apart the renaming, the logic of doCloseDocument() remains the same.

CCMAIL: okular-devel@kde.org

svn path=/trunk/KDE/kdegraphics/okular/; revision=723046
2007-10-08 16:46:51 +00:00
Pino Toscano e6ad3722ae few apidox more
svn path=/trunk/KDE/kdegraphics/okular/; revision=712478
2007-09-14 14:19:52 +00:00
Pino Toscano 006111382b common d_ptr+q_ptr structure for Generator/TextDocumentGenerator, and their private classes
svn path=/trunk/KDE/kdegraphics/okular/; revision=712465
2007-09-14 13:31:55 +00:00
Pino Toscano 1d40b13d2b SVN_SILENT exclude more private stuff from the apidox
svn path=/trunk/KDE/kdegraphics/okular/; revision=707467
2007-09-01 22:48:28 +00:00
Pino Toscano 0e12746a92 Link -> Action renaming.
TextDocumentConverter::addLink -> addAction
Document::processLink -> processAction

svn path=/trunk/KDE/kdegraphics/okular/; revision=656145
2007-04-20 12:49:17 +00:00
Pino Toscano 5f21b15d99 Link -> Action renaming.
Step #2: Link -> Action for the action hierarchy, and for the ObjectRect type.

svn path=/trunk/KDE/kdegraphics/okular/; revision=656140
2007-04-20 12:37:12 +00:00
Pino Toscano 6068c76df6 Merge the new functions of ThreadedGenerator into the base Generator: this means that there's again only a single base Generator that can provide the multithreading for the generation of contents, just pixmaps for now.
svn path=/trunk/playground/graphics/okular/; revision=628853
2007-01-31 18:31:19 +00:00
Tobias Koenig baf1fb2870 Several changes:
- renamed signalRequestDone to signalPixmapRequestDone to allow a future signalTextPageRequestDone
  - added error/warning/notice signals to TextDocumentConverter and add meaningful error messages
    to ooo and fictionbook generator
  - code cleanup in chm generator
  - print improvements and error notification in kimgio generator

svn path=/trunk/playground/graphics/okular/; revision=628124
2007-01-29 08:17:45 +00:00
Pino Toscano 55dfb87f3f simplify a bit the Feature system: move it to the base Generator class, and add a protected method to switch a feature on and off easily - no more need to copy&paste hasFeature() anymore
svn path=/trunk/playground/graphics/okular/; revision=627450
2007-01-26 16:35:30 +00:00
Tobias Koenig d227a94e79 First part of the porting to a threaded api for generators
- made comicbook, tiff and kimgio a threaded generator

svn path=/trunk/playground/graphics/okular/; revision=626761
2007-01-24 15:06:45 +00:00
Tobias Koenig 460f972d19 Arrgh, forgot to commit this last time :/
svn path=/trunk/playground/graphics/okular/; revision=625249
2007-01-19 16:33:58 +00:00
Pino Toscano 135a18b407 get rid of supportsSearching() by using a proper feature
svn path=/trunk/playground/graphics/okular/; revision=624587
2007-01-17 11:58:20 +00:00
Pino Toscano 468a0da775 bye bye canGenerateTextPage(), unused nowadays
svn path=/trunk/playground/graphics/okular/; revision=624579
2007-01-17 11:34:47 +00:00
Tobias Koenig e1ab8660ef Add new TextDocumentGenerator class, which is a base class for
generators which work on a QTextDocument. So all the nasty calculation
for text extraction and link/annotation positions is done by the
generator.

Ported FictionBook generator to it.


svn path=/trunk/playground/graphics/okular/; revision=623071
2007-01-13 23:15:28 +00:00