Okular

generator.h
1/*
2 SPDX-FileCopyrightText: 2004-5 Enrico Ros <eros.kde@email.it>
3 SPDX-FileCopyrightText: 2005 Piotr Szymanski <niedakh@gmail.com>
4 SPDX-FileCopyrightText: 2008 Albert Astals Cid <aacid@kde.org>
5
6 Work sponsored by the LiMux project of the city of Munich:
7 SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB a KDAB Group company <info@kdab.com>
8
9 SPDX-License-Identifier: GPL-2.0-or-later
10*/
11
12#ifndef _OKULAR_GENERATOR_H_
13#define _OKULAR_GENERATOR_H_
14
15#include "document.h"
16#include "fontinfo.h"
17#include "global.h"
18#include "okularcore_export.h"
19#include "pagesize.h"
20#include "signatureutils.h"
21
22#include <QList>
23#include <QObject>
24#include <QSharedDataPointer>
25#include <QSizeF>
26#include <QString>
27#include <QVariant>
28#include <QVector>
29
30#include <KPluginFactory>
31#include <QMimeType>
32
33#define OKULAR_EXPORT_PLUGIN(classname, json) \
34 static_assert(json[0] != '\0', "arg2 must be a string literal"); \
35 K_PLUGIN_CLASS_WITH_JSON(classname, json)
36
37class QByteArray;
38class QMutex;
39class QPrinter;
40class QIcon;
41
42namespace Okular
43{
44class BackendOpaqueAction;
45class DocumentFonts;
46class DocumentInfo;
47class DocumentObserver;
48class DocumentSynopsis;
49class EmbeddedFile;
50class ExportFormatPrivate;
51class FontInfo;
52class GeneratorPrivate;
53class Page;
54class PixmapRequest;
55class PixmapRequestPrivate;
56class TextPage;
57class TextRequest;
58class TextRequestPrivate;
59class NormalizedRect;
60
61/* Note: on contents generation and asynchronous queries.
62 * Many observers may want to request data synchronously or asynchronously.
63 * - Sync requests. These should be done in-place.
64 * - Async request must be done in real background. That usually means a
65 * thread, such as QThread derived classes.
66 * Once contents are available, they must be immediately stored in the
67 * Page they refer to, and a signal is emitted as soon as storing
68 * (even for sync or async queries) has been done.
69 */
70
71/**
72 * @short Defines an entry for the export menu
73 *
74 * This class encapsulates information about an export format.
75 * Every Generator can support 0 or more export formats which can be
76 * queried with @ref Generator::exportFormats().
77 */
78class OKULARCORE_EXPORT ExportFormat
79{
80public:
82
83 /**
84 * Creates an empty export format.
85 *
86 * @see isNull()
87 */
89
90 /**
91 * Creates a new export format.
92 *
93 * @param description The i18n'ed description of the format.
94 * @param mimeType The supported mime type of the format.
95 */
96 ExportFormat(const QString &description, const QMimeType &mimeType);
97
98 /**
99 * Creates a new export format.
100 *
101 * @param icon The icon used in the GUI for this format.
102 * @param description The i18n'ed description of the format.
103 * @param mimeType The supported mime type of the format.
104 */
105 ExportFormat(const QIcon &icon, const QString &description, const QMimeType &mimeType);
106
107 /**
108 * Destroys the export format.
109 */
111
112 /**
113 * @internal
114 */
115 ExportFormat(const ExportFormat &other);
116
117 /**
118 * @internal
119 */
120 ExportFormat &operator=(const ExportFormat &other);
121
122 /**
123 * Returns the description of the format.
124 */
125 QString description() const;
126
127 /**
128 * Returns the mime type of the format.
129 */
130 QMimeType mimeType() const;
131
132 /**
133 * Returns the icon for GUI representations of the format.
134 */
135 QIcon icon() const;
136
137 /**
138 * Returns whether the export format is null/valid.
139 *
140 * An ExportFormat is null if the mimetype is not valid or the
141 * description is empty, or both.
142 */
143 bool isNull() const;
144
145 /**
146 * Type of standard export format.
147 */
149 PlainText, ///< Plain text
150 PDF, ///< PDF, aka Portable Document Format
151 OpenDocumentText, ///< OpenDocument Text format @since 0.8 (KDE 4.2)
152 HTML ///< OpenDocument Text format @since 0.8 (KDE 4.2)
153 };
154
155 /**
156 * Builds a standard format for the specified @p type .
157 */
158 static ExportFormat standardFormat(StandardExportFormat type);
159
160 bool operator==(const ExportFormat &other) const;
161
162 bool operator!=(const ExportFormat &other) const;
163
164private:
165 /// @cond PRIVATE
166 friend class ExportFormatPrivate;
167 /// @endcond
169};
170
171/**
172 * @short [Abstract Class] The information generator.
173 *
174 * Most of class members are virtuals and some of them pure virtual. The pure
175 * virtuals provide the minimal functionalities for a Generator, that is being
176 * able to generate QPixmap for the Page 's of the Document.
177 *
178 * Implementing the other functions will make the Generator able to provide
179 * more contents and/or functionalities (like text extraction).
180 *
181 * Generation/query is requested by the Document class only, and that
182 * class stores the resulting data into Page s. The data will then be
183 * displayed by the GUI components (PageView, ThumbnailList, etc..).
184 *
185 * @see PrintInterface, ConfigInterface, GuiInterface
186 */
187class OKULARCORE_EXPORT Generator : public QObject
188{
189 /// @cond PRIVATE
190 friend class PixmapGenerationThread;
191 friend class TextPageGenerationThread;
192 /// @endcond
193
194 Q_OBJECT
195
196public:
197 /**
198 * Describe the possible optional features that a Generator can
199 * provide.
200 */
202 Threaded, ///< Whether the Generator supports asynchronous generation of pictures or text pages
203 TextExtraction, ///< Whether the Generator can extract text from the document in the form of TextPage's
204 ReadRawData, ///< Whether the Generator can read a document directly from its raw data.
205 FontInfo, ///< Whether the Generator can provide information about the fonts used in the document
206 PageSizes, ///< Whether the Generator can change the size of the document pages.
207 PrintNative, ///< Whether the Generator supports native cross-platform printing (QPainter-based).
208 PrintPostscript, ///< Whether the Generator supports postscript-based file printing.
209 PrintToFile, ///< Whether the Generator supports export to PDF & PS through the Print Dialog
210 TiledRendering, ///< Whether the Generator can render tiles @since 0.16 (KDE 4.10)
211 SwapBackingFile, ///< Whether the Generator can hot-swap the file it's reading from @since 1.3
212 SupportsCancelling ///< Whether the Generator can cancel requests @since 1.4
213 };
214
215 /**
216 * Creates a new generator.
217 */
218 explicit Generator(QObject *parent = nullptr, const QVariantList &args = QVariantList());
219
220 /**
221 * Destroys the generator.
222 */
223 ~Generator() override;
224
225 /**
226 * Loads the document with the given @p fileName and fills the
227 * @p pagesVector with the parsed pages.
228 *
229 * @note If you implement the WithPassword variants you don't need to implement this one
230 *
231 * @returns true on success, false otherwise.
232 */
233 virtual bool loadDocument(const QString &fileName, QVector<Page *> &pagesVector);
234
235 /**
236 * Loads the document from the raw data @p fileData and fills the
237 * @p pagesVector with the parsed pages.
238 *
239 * @note If you implement the WithPassword variants you don't need to implement this one
240 *
241 * @note the Generator has to have the feature @ref ReadRawData enabled
242 *
243 * @returns true on success, false otherwise.
244 */
245 virtual bool loadDocumentFromData(const QByteArray &fileData, QVector<Page *> &pagesVector);
246
247 /**
248 * Loads the document with the given @p fileName and @p password and fills the
249 * @p pagesVector with the parsed pages.
250 *
251 * @note Do not implement this if your format doesn't support passwords, it'll cleanly call loadDocument()
252 *
253 * @since 0.20 (KDE 4.14)
254 *
255 * @returns a LoadResult defining the result of the operation
256 */
257 virtual Document::OpenResult loadDocumentWithPassword(const QString &fileName, QVector<Page *> &pagesVector, const QString &password);
258
259 /**
260 * Loads the document from the raw data @p fileData and @p password and fills the
261 * @p pagesVector with the parsed pages.
262 *
263 * @note Do not implement this if your format doesn't support passwords, it'll cleanly call loadDocumentFromData()
264 *
265 * @note the Generator has to have the feature @ref ReadRawData enabled
266 *
267 * @since 0.20 (KDE 4.14)
268 *
269 * @returns a LoadResult defining the result of the operation
270 */
271 virtual Document::OpenResult loadDocumentFromDataWithPassword(const QByteArray &fileData, QVector<Page *> &pagesVector, const QString &password);
272
273 /**
274 * Describes the result of an swap file operation.
275 *
276 * @since 1.3
277 */
279 SwapBackingFileError, //< The document could not be swapped
280 SwapBackingFileNoOp, //< The document was swapped and nothing needs to be done
281 SwapBackingFileReloadInternalData //< The document was swapped and internal data (forms, annotations, etc) needs to be reloaded
282 };
283
284 /**
285 * Changes the path of the file we are reading from. The new path must
286 * point to a copy of the same document.
287 *
288 * @note the Generator has to have the feature @ref SwapBackingFile enabled
289 *
290 * @since 1.3
291 */
292 virtual SwapBackingFileResult swapBackingFile(const QString &newFileName, QVector<Okular::Page *> &newPagesVector);
293
294 /**
295 * This method is called when the document is closed and not used
296 * any longer.
297 *
298 * @returns true on success, false otherwise.
299 */
300 bool closeDocument();
301
302 /**
303 * This method returns whether the generator is ready to
304 * handle a new pixmap request.
305 */
306 virtual bool canGeneratePixmap() const;
307
308 virtual bool canSign() const;
309
310 virtual bool sign(const NewSignatureData &data, const QString &rFilename);
311
312 virtual CertificateStore *certificateStore() const;
313
314 /**
315 * This method can be called to trigger the generation of
316 * a new pixmap as described by @p request.
317 */
318 virtual void generatePixmap(PixmapRequest *request);
319
320 /**
321 * This method returns whether the generator is ready to
322 * handle a new text page request.
323 */
324 virtual bool canGenerateTextPage() const;
325
326 /**
327 * This method can be called to trigger the generation of
328 * a text page for the given @p page.
329 *
330 * The generation is done in the calling thread.
331 *
332 * @see TextPage
333 */
334 void generateTextPage(Page *page);
335
336 /**
337 * Returns the general information object of the document.
338 *
339 * Changed signature in okular version 0.21
340 */
341 virtual DocumentInfo generateDocumentInfo(const QSet<DocumentInfo::Key> &keys) const;
342
343 /**
344 * Returns the 'table of content' object of the document or 0 if
345 * no table of content is available.
346 */
347 virtual const DocumentSynopsis *generateDocumentSynopsis();
348
349 /**
350 * Returns the 'list of embedded fonts' object of the specified \p page
351 * of the document.
352 *
353 * \param page a page of the document, starting from 0 - -1 indicates all
354 * the other fonts
355 */
356 virtual FontInfo::List fontsForPage(int page);
357
358 /**
359 * Returns the 'list of embedded files' object of the document or 0 if
360 * no list of embedded files is available.
361 */
362 virtual const QList<EmbeddedFile *> *embeddedFiles() const;
363
364 /**
365 * This enum identifies the metric of the page size.
366 */
368 None, ///< The page size is not defined in a physical metric.
369 Points, ///< The page size is given in 1/72 inches.
370 Pixels ///< The page size is given in screen pixels @since 0.19 (KDE 4.13)
371 };
372
373 /**
374 * This method returns the metric of the page size. Default is @ref None.
375 */
376 virtual PageSizeMetric pagesSizeMetric() const;
377
378 /**
379 * Returns whether the given @p action is allowed in the document.
380 * @see @ref Okular::Permission
381 */
382 virtual bool isAllowed(Permission action) const;
383
384 /**
385 * This method is called when the orientation has been changed by the user.
386 */
387 virtual void rotationChanged(Rotation orientation, Rotation oldOrientation);
388
389 /**
390 * Returns the list of supported page sizes.
391 */
392 virtual PageSize::List pageSizes() const;
393
394 /**
395 * This method is called when the page size has been changed by the user.
396 */
397 virtual void pageSizeChanged(const PageSize &pageSize, const PageSize &oldPageSize);
398
399 /**
400 * This method is called to print the document to the given @p printer.
401 */
402 virtual Document::PrintError print(QPrinter &printer);
403
404 /**
405 * This method returns the meta data of the given @p key with the given @p option
406 * of the document.
407 */
408 virtual QVariant metaData(const QString &key, const QVariant &option) const;
409
410 /**
411 * Returns the list of additional supported export formats.
412 */
413 virtual ExportFormat::List exportFormats() const;
414
415 /**
416 * This method is called to export the document in the given @p format and save it
417 * under the given @p fileName. The format must be one of the supported export formats.
418 */
419 virtual bool exportTo(const QString &fileName, const ExportFormat &format);
420
421 /**
422 * This method is called to know which wallet data should be used for the given file name.
423 * Unless you have very special requirements to where wallet data should be stored you
424 * don't need to reimplement this method.
425 */
426 virtual void walletDataForFile(const QString &fileName, QString *walletName, QString *walletFolder, QString *walletKey) const;
427
428 /**
429 * Query for the specified @p feature.
430 */
431 bool hasFeature(GeneratorFeature feature) const;
432
433 /**
434 * Update DPI of the generator
435 *
436 * @since 0.19 (old signature)
437 * @since 22.04 (new signature)
438 */
439 void setDPI(const QSizeF dpi);
440
441 /**
442 * Returns the 'layers model' object of the document or NULL if
443 * layers model is not available.
444 *
445 * @since 0.24
446 */
447 virtual QAbstractItemModel *layersModel() const;
448
449 /**
450 * Calls the backend to execute an BackendOpaqueAction
451 */
452 virtual void opaqueAction(const BackendOpaqueAction *action);
453
454 /**
455 * Frees the contents of the opaque action (if any);
456 *
457 * @since 22.04
458 */
459 virtual void freeOpaqueActionContents(const BackendOpaqueAction &action);
460
461Q_SIGNALS:
462 /**
463 * This signal should be emitted whenever an error occurred in the generator.
464 *
465 * @param message The message which should be shown to the user.
466 * @param duration The time that the message should be shown to the user.
467 */
468 void error(const QString &message, int duration);
469
470 /**
471 * This signal should be emitted whenever the user should be warned.
472 *
473 * @param message The message which should be shown to the user.
474 * @param duration The time that the message should be shown to the user.
475 */
476 void warning(const QString &message, int duration);
477
478 /**
479 * This signal should be emitted whenever the user should be noticed.
480 *
481 * @param message The message which should be shown to the user.
482 * @param duration The time that the message should be shown to the user.
483 */
484 void notice(const QString &message, int duration);
485
486protected:
487 /**
488 * This method must be called when the pixmap request triggered by generatePixmap()
489 * has been finished.
490 */
491 void signalPixmapRequestDone(PixmapRequest *request);
492
493 /**
494 * This method must be called when a text generation has been finished.
495 */
496 void signalTextGenerationDone(Page *page, TextPage *textPage);
497
498 /**
499 * This method is called when the document is closed and not used
500 * any longer.
501 *
502 * @returns true on success, false otherwise.
503 */
504 virtual bool doCloseDocument() = 0;
505
506 /**
507 * Returns the image of the page as specified in
508 * the passed pixmap @p request.
509 *
510 * Must return a null image if the request was cancelled and the generator supports cancelling
511 *
512 * @warning this method may be executed in its own separated thread if the
513 * @ref Threaded is enabled!
514 */
515 virtual QImage image(PixmapRequest *request);
516
517 /**
518 * Returns the text page for the given @p request.
519 *
520 * Must return a null pointer if the request was cancelled and the generator supports cancelling
521 *
522 * @warning this method may be executed in its own separated thread if the
523 * @ref Threaded is enabled!
524 *
525 * @since 1.4
526 */
527 virtual TextPage *textPage(TextRequest *request);
528
529 /**
530 * Returns a pointer to the document.
531 */
532 const Document *document() const;
533
534 /**
535 * Toggle the @p feature .
536 */
537 void setFeature(GeneratorFeature feature, bool on = true);
538
539 /**
540 * Internal document setting
541 */
543 PaperColorMetaData, ///< Returns (QColor) the paper color if set in Settings or the default color (white) if option is true (otherwise returns a non initialized QColor)
544 TextAntialiasMetaData, ///< Returns (bool) text antialias from Settings (option is not used)
545 GraphicsAntialiasMetaData, ///< Returns (bool)graphic antialias from Settings (option is not used)
546 TextHintingMetaData ///< Returns (bool)text hinting from Settings (option is not used)
547 };
548
549 /**
550 * Request a meta data of the Document, if available, like an internal
551 * setting.
552 *
553 * @since 1.1
554 */
555 QVariant documentMetaData(const DocumentMetaDataKey key, const QVariant &option = QVariant()) const;
556
557 /**
558 * Return the pointer to a mutex the generator can use freely.
559 */
560 QMutex *userMutex() const;
561
562 /**
563 * Set the bounding box of a page after the page has already been handed
564 * to the Document. Call this instead of Page::setBoundingBox() to ensure
565 * that all observers are notified.
566 *
567 * @since 0.7 (KDE 4.1)
568 */
569 void updatePageBoundingBox(int page, const NormalizedRect &boundingBox);
570
571 /**
572 * Returns DPI, previously set via setDPI()
573 * @since 0.19 (KDE 4.13)
574 */
575 QSizeF dpi() const;
576
577 /**
578 * Gets the font data for the given font
579 *
580 * @since 0.8 (old signature)
581 * @since 22.04 (new signature)
582 */
583 virtual QByteArray requestFontData(const Okular::FontInfo &font);
584
585protected Q_SLOTS:
586 /**
587 * This method can be called to trigger a partial pixmap update for the given request
588 * Make sure you call it in a way it's executed in the main thread.
589 * @since 1.3
590 */
591 void signalPartialPixmapRequest(Okular::PixmapRequest *request, const QImage &image);
592
593protected:
594 /// @cond PRIVATE
595 Generator(GeneratorPrivate &dd, QObject *parent, const QVariantList &args);
596 Q_DECLARE_PRIVATE(Generator)
597 GeneratorPrivate *d_ptr;
598
599 friend class Document;
600 friend class DocumentPrivate;
601 /// @endcond PRIVATE
602
603private:
604 Q_DISABLE_COPY(Generator)
605};
606
607/**
608 * @short Describes a pixmap type request.
609 */
610class OKULARCORE_EXPORT PixmapRequest
611{
612 friend class Document;
613 friend class DocumentPrivate;
614
615public:
616 enum PixmapRequestFeature { NoFeature = 0, Asynchronous = 1, Preload = 2 };
617 Q_DECLARE_FLAGS(PixmapRequestFeatures, PixmapRequestFeature)
618
619 /**
620 * Creates a new pixmap request.
621 *
622 * @param observer The observer.
623 * @param pageNumber The page number.
624 * @param width The width of the page in logical pixels.
625 * @param height The height of the page in logical pixels.
626 * @param dpr Device pixel ratio of the screen that the pixmap is intended for.
627 * @param priority The priority of the request.
628 * @param features The features of generation.
629 */
630 PixmapRequest(DocumentObserver *observer, int pageNumber, int width, int height, qreal dpr, int priority, PixmapRequestFeatures features);
631
632 /**
633 * Destroys the pixmap request.
634 */
636
637 /**
638 * Returns the observer of the request.
639 */
640 DocumentObserver *observer() const;
641
642 /**
643 * Returns the page number of the request.
644 */
645 int pageNumber() const;
646
647 /**
648 * Returns the page width of the requested pixmap.
649 */
650 int width() const;
651
652 /**
653 * Returns the page height of the requested pixmap.
654 */
655 int height() const;
656
657 /**
658 * Returns the priority (less it better, 0 is maximum) of the
659 * request.
660 */
661 int priority() const;
662
663 /**
664 * Returns whether the generation should be done synchronous or
665 * asynchronous.
666 *
667 * If asynchronous, the pixmap is created in a thread and the observer
668 * is notified when the job is done.
669 */
670 bool asynchronous() const;
671
672 /**
673 * Returns whether the generation request is for a page that is not important
674 * i.e. it's just for speeding up future rendering
675 */
676 bool preload() const;
677
678 /**
679 * Returns a pointer to the page where the pixmap shall be generated for.
680 */
681 Page *page() const;
682
683 /**
684 * Sets whether the generator should render only the given normalized
685 * rect or the entire page
686 *
687 * @since 0.16 (KDE 4.10)
688 */
689 void setTile(bool tile);
690
691 /**
692 * Returns whether the generator should render just the region given by
693 * normalizedRect() or the entire page.
694 *
695 * @since 0.16 (KDE 4.10)
696 */
697 bool isTile() const;
698
699 /**
700 * Sets the region of the page to request.
701 *
702 * @since 0.16 (KDE 4.10)
703 */
704 void setNormalizedRect(const NormalizedRect &rect);
705
706 /**
707 * Returns the normalized region of the page to request.
708 *
709 * @since 0.16 (KDE 4.10)
710 */
711 const NormalizedRect &normalizedRect() const;
712
713 /**
714 * Sets whether the request should report back updates if possible
715 *
716 * @since 1.3
717 */
718 void setPartialUpdatesWanted(bool partialUpdatesWanted);
719
720 /**
721 * Should the request report back updates if possible?
722 *
723 * @since 1.3
724 */
725 bool partialUpdatesWanted() const;
726
727 /**
728 * Should the request be aborted if possible?
729 *
730 * @since 1.4
731 */
732 bool shouldAbortRender() const;
733
734private:
735 Q_DISABLE_COPY(PixmapRequest)
736
737 friend class PixmapRequestPrivate;
738 PixmapRequestPrivate *const d;
739};
740
741/**
742 * @short Describes a text request.
743 *
744 * @since 1.4
745 */
746class OKULARCORE_EXPORT TextRequest
747{
748public:
749 /**
750 * Creates a new text request.
751 */
752 explicit TextRequest(Page *page);
753
754 TextRequest();
755
756 /**
757 * Destroys the pixmap request.
758 */
759 ~TextRequest();
760
761 /**
762 * Returns a pointer to the page where the pixmap shall be generated for.
763 */
764 Page *page() const;
765
766 /**
767 * Should the request be aborted if possible?
768 */
769 bool shouldAbortExtraction() const;
770
771private:
772 Q_DISABLE_COPY(TextRequest)
773
774 friend TextRequestPrivate;
775 TextRequestPrivate *const d;
776};
777
778}
779
780Q_DECLARE_METATYPE(Okular::PixmapRequest *)
781
782#define OkularGeneratorInterface_iid "org.kde.okular.Generator"
783Q_DECLARE_INTERFACE(Okular::Generator, OkularGeneratorInterface_iid)
784
785#ifndef QT_NO_DEBUG_STREAM
786OKULARCORE_EXPORT QDebug operator<<(QDebug str, const Okular::PixmapRequest &req);
787#endif
788
789#endif
790
791/* kate: replace-tabs on; indent-width 4; */
A helper class to store information about x509 certificate.
The DocumentInfo structure can be filled in by generators to display metadata about the currently ope...
Definition document.h:76
Base class for objects being notified when something changes.
Definition observer.h:29
A DOM tree that describes the Table of Contents.
Definition document.h:1431
The Document.
Definition document.h:192
OpenResult
Describes the result of an open document operation.
Definition document.h:210
Defines an entry for the export menu.
Definition generator.h:79
StandardExportFormat
Type of standard export format.
Definition generator.h:148
@ PDF
PDF, aka Portable Document Format.
Definition generator.h:150
@ OpenDocumentText
OpenDocument Text format.
Definition generator.h:151
@ PlainText
Plain text.
Definition generator.h:149
A small class that represents the information of a font.
Definition fontinfo.h:25
[Abstract Class] The information generator.
Definition generator.h:188
void error(const QString &message, int duration)
This signal should be emitted whenever an error occurred in the generator.
SwapBackingFileResult
Describes the result of an swap file operation.
Definition generator.h:278
DocumentMetaDataKey
Internal document setting.
Definition generator.h:542
@ GraphicsAntialiasMetaData
Returns (bool)graphic antialias from Settings (option is not used)
Definition generator.h:545
@ TextAntialiasMetaData
Returns (bool) text antialias from Settings (option is not used)
Definition generator.h:544
@ PaperColorMetaData
Returns (QColor) the paper color if set in Settings or the default color (white) if option is true (o...
Definition generator.h:543
void notice(const QString &message, int duration)
This signal should be emitted whenever the user should be noticed.
GeneratorFeature
Describe the possible optional features that a Generator can provide.
Definition generator.h:201
@ Threaded
Whether the Generator supports asynchronous generation of pictures or text pages.
Definition generator.h:202
@ PrintToFile
Whether the Generator supports export to PDF & PS through the Print Dialog.
Definition generator.h:209
@ ReadRawData
Whether the Generator can read a document directly from its raw data.
Definition generator.h:204
@ TextExtraction
Whether the Generator can extract text from the document in the form of TextPage's.
Definition generator.h:203
@ TiledRendering
Whether the Generator can render tiles.
Definition generator.h:210
@ SwapBackingFile
Whether the Generator can hot-swap the file it's reading from.
Definition generator.h:211
@ PrintNative
Whether the Generator supports native cross-platform printing (QPainter-based).
Definition generator.h:207
@ FontInfo
Whether the Generator can provide information about the fonts used in the document.
Definition generator.h:205
@ PageSizes
Whether the Generator can change the size of the document pages.
Definition generator.h:206
@ PrintPostscript
Whether the Generator supports postscript-based file printing.
Definition generator.h:208
PageSizeMetric
This enum identifies the metric of the page size.
Definition generator.h:367
@ Points
The page size is given in 1/72 inches.
Definition generator.h:369
@ None
The page size is not defined in a physical metric.
Definition generator.h:368
virtual bool doCloseDocument()=0
This method is called when the document is closed and not used any longer.
void warning(const QString &message, int duration)
This signal should be emitted whenever the user should be warned.
Data needed to create a new signature.
Definition document.h:1538
A NormalizedRect is a rectangle which can be defined by two NormalizedPoints.
Definition area.h:189
A small class that represents the size of a page.
Definition pagesize.h:24
Collector for all the data belonging to a page.
Definition page.h:48
Describes a pixmap type request.
Definition generator.h:611
Represents the textual information of a Page.
Definition textpage.h:102
Describes a text request.
Definition generator.h:747
global.h
Definition action.h:17
Permission
Describes the DRM capabilities.
Definition global.h:24
Rotation
A rotation.
Definition global.h:46
@ Asynchronous
Will create the object in an asynchronous way.
Definition global.h:58
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:35 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.