Okular

generator.h
1 /*
2  SPDX-FileCopyrightText: 2004-5 Enrico Ros <[email protected]>
3  SPDX-FileCopyrightText: 2005 Piotr Szymanski <[email protected]>
4  SPDX-FileCopyrightText: 2008 Albert Astals Cid <[email protected]>
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 <[email protected]>
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 
37 class QByteArray;
38 class QMutex;
39 class QPrinter;
40 class QIcon;
41 
42 namespace Okular
43 {
44 class BackendOpaqueAction;
45 class DocumentFonts;
46 class DocumentInfo;
47 class DocumentObserver;
48 class DocumentSynopsis;
49 class EmbeddedFile;
50 class ExportFormatPrivate;
51 class FontInfo;
52 class GeneratorPrivate;
53 class Page;
54 class PixmapRequest;
55 class PixmapRequestPrivate;
56 class TextPage;
57 class TextRequest;
58 class TextRequestPrivate;
59 class 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  */
78 class OKULARCORE_EXPORT ExportFormat
79 {
80 public:
81  typedef QList<ExportFormat> List;
82 
83  /**
84  * Creates an empty export format.
85  *
86  * @see isNull()
87  */
88  ExportFormat();
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  */
110  ~ExportFormat();
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 
164 private:
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  */
187 class OKULARCORE_EXPORT Generator : public QObject
188 {
189  /// @cond PRIVATE
190  friend class PixmapGenerationThread;
191  friend class TextPageGenerationThread;
192  /// @endcond
193 
194  Q_OBJECT
195 
196 public:
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 
461 Q_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 
486 protected:
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 
585 protected 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 
593 protected:
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 
603 private:
604  Q_DISABLE_COPY(Generator)
605 };
606 
607 /**
608  * @short Describes a pixmap type request.
609  */
610 class OKULARCORE_EXPORT PixmapRequest
611 {
612  friend class Document;
613  friend class DocumentPrivate;
614 
615 public:
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 priority The priority of the request.
627  * @param features The features of generation.
628  */
629  [[deprecated("This PixmapRequest constructor is deprecated, use the one including the device pixel ratio")]] PixmapRequest(DocumentObserver *observer, int pageNumber, int width, int height, int priority, PixmapRequestFeatures features);
630 
631  /**
632  * Creates a new pixmap request.
633  *
634  * @param observer The observer.
635  * @param pageNumber The page number.
636  * @param width The width of the page in logical pixels.
637  * @param height The height of the page in logical pixels.
638  * @param dpr Device pixel ratio of the screen that the pixmap is intended for.
639  * @param priority The priority of the request.
640  * @param features The features of generation.
641  */
642  PixmapRequest(DocumentObserver *observer, int pageNumber, int width, int height, qreal dpr, int priority, PixmapRequestFeatures features);
643 
644  /**
645  * Destroys the pixmap request.
646  */
647  ~PixmapRequest();
648 
649  /**
650  * Returns the observer of the request.
651  */
652  DocumentObserver *observer() const;
653 
654  /**
655  * Returns the page number of the request.
656  */
657  int pageNumber() const;
658 
659  /**
660  * Returns the page width of the requested pixmap.
661  */
662  int width() const;
663 
664  /**
665  * Returns the page height of the requested pixmap.
666  */
667  int height() const;
668 
669  /**
670  * Returns the priority (less it better, 0 is maximum) of the
671  * request.
672  */
673  int priority() const;
674 
675  /**
676  * Returns whether the generation should be done synchronous or
677  * asynchronous.
678  *
679  * If asynchronous, the pixmap is created in a thread and the observer
680  * is notified when the job is done.
681  */
682  bool asynchronous() const;
683 
684  /**
685  * Returns whether the generation request is for a page that is not important
686  * i.e. it's just for speeding up future rendering
687  */
688  bool preload() const;
689 
690  /**
691  * Returns a pointer to the page where the pixmap shall be generated for.
692  */
693  Page *page() const;
694 
695  /**
696  * Sets whether the generator should render only the given normalized
697  * rect or the entire page
698  *
699  * @since 0.16 (KDE 4.10)
700  */
701  void setTile(bool tile);
702 
703  /**
704  * Returns whether the generator should render just the region given by
705  * normalizedRect() or the entire page.
706  *
707  * @since 0.16 (KDE 4.10)
708  */
709  bool isTile() const;
710 
711  /**
712  * Sets the region of the page to request.
713  *
714  * @since 0.16 (KDE 4.10)
715  */
716  void setNormalizedRect(const NormalizedRect &rect);
717 
718  /**
719  * Returns the normalized region of the page to request.
720  *
721  * @since 0.16 (KDE 4.10)
722  */
723  const NormalizedRect &normalizedRect() const;
724 
725  /**
726  * Sets whether the request should report back updates if possible
727  *
728  * @since 1.3
729  */
730  void setPartialUpdatesWanted(bool partialUpdatesWanted);
731 
732  /**
733  * Should the request report back updates if possible?
734  *
735  * @since 1.3
736  */
737  bool partialUpdatesWanted() const;
738 
739  /**
740  * Should the request be aborted if possible?
741  *
742  * @since 1.4
743  */
744  bool shouldAbortRender() const;
745 
746 private:
747  Q_DISABLE_COPY(PixmapRequest)
748 
749  friend class PixmapRequestPrivate;
750  PixmapRequestPrivate *const d;
751 };
752 
753 /**
754  * @short Describes a text request.
755  *
756  * @since 1.4
757  */
758 class OKULARCORE_EXPORT TextRequest
759 {
760 public:
761  /**
762  * Creates a new text request.
763  */
764  explicit TextRequest(Page *page);
765 
766  TextRequest();
767 
768  /**
769  * Destroys the pixmap request.
770  */
771  ~TextRequest();
772 
773  /**
774  * Returns a pointer to the page where the pixmap shall be generated for.
775  */
776  Page *page() const;
777 
778  /**
779  * Should the request be aborted if possible?
780  */
781  bool shouldAbortExtraction() const;
782 
783 private:
784  Q_DISABLE_COPY(TextRequest)
785 
786  friend TextRequestPrivate;
787  TextRequestPrivate *const d;
788 };
789 
790 }
791 
792 Q_DECLARE_METATYPE(Okular::PixmapRequest *)
793 
794 #define OkularGeneratorInterface_iid "org.kde.okular.Generator"
795 Q_DECLARE_INTERFACE(Okular::Generator, OkularGeneratorInterface_iid)
796 
797 #ifndef QT_NO_DEBUG_STREAM
798 OKULARCORE_EXPORT QDebug operator<<(QDebug str, const Okular::PixmapRequest &req);
799 #endif
800 
801 #endif
802 
803 /* kate: replace-tabs on; indent-width 4; */
Collector for all the data belonging to a page.
Definition: page.h:47
@ GraphicsAntialiasMetaData
Returns (bool)graphic antialias from Settings (option is not used)
Definition: generator.h:545
The Document.
Definition: document.h:190
@ Threaded
Whether the Generator supports asynchronous generation of pictures or text pages.
Definition: generator.h:202
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
A helper class to store information about x509 certificate.
The documentation to the global Okular namespace.
Definition: action.h:16
DocumentMetaDataKey
Internal document setting.
Definition: generator.h:542
Data needed to create a new signature.
Definition: document.h:1539
A DOM tree that describes the Table of Contents.
Definition: document.h:1432
Base class for objects being notified when something changes.
Definition: observer.h:28
Defines an entry for the export menu.
Definition: generator.h:78
@ PrintToFile
Whether the Generator supports export to PDF & PS through the Print Dialog.
Definition: generator.h:209
Represents the textual information of a Page.
Definition: textpage.h:105
@ PDF
PDF, aka Portable Document Format.
Definition: generator.h:150
@ PlainText
Plain text.
Definition: generator.h:149
@ TiledRendering
Whether the Generator can render tiles.
Definition: generator.h:210
@ ReadRawData
Whether the Generator can read a document directly from its raw data.
Definition: generator.h:204
Describes a pixmap type request.
Definition: generator.h:610
SwapBackingFileResult
Describes the result of an swap file operation.
Definition: generator.h:278
OpenResult
Describes the result of an open document operation.
Definition: document.h:209
[Abstract Class] The information generator.
Definition: generator.h:187
PageSizeMetric
This enum identifies the metric of the page size.
Definition: generator.h:367
@ TextExtraction
Whether the Generator can extract text from the document in the form of TextPage's.
Definition: generator.h:203
@ TextAntialiasMetaData
Returns (bool) text antialias from Settings (option is not used)
Definition: generator.h:544
@ Asynchronous
Will create the object in an asynchronous way.
Definition: global.h:57
A NormalizedRect is a rectangle which can be defined by two NormalizedPoints.
Definition: area.h:188
Permission
Describes the DRM capabilities.
Definition: global.h:23
Describes a text request.
Definition: generator.h:758
@ PrintPostscript
Whether the Generator supports postscript-based file printing.
Definition: generator.h:208
@ Points
The page size is given in 1/72 inches.
Definition: generator.h:369
GeneratorFeature
Describe the possible optional features that a Generator can provide.
Definition: generator.h:201
@ SwapBackingFile
Whether the Generator can hot-swap the file it's reading from.
Definition: generator.h:211
@ OpenDocumentText
OpenDocument Text format.
Definition: generator.h:151
@ PageSizes
Whether the Generator can change the size of the document pages.
Definition: generator.h:206
@ FontInfo
Whether the Generator can provide information about the fonts used in the document.
Definition: generator.h:205
StandardExportFormat
Type of standard export format.
Definition: generator.h:148
A small class that represents the information of a font.
Definition: fontinfo.h:24
A small class that represents the size of a page.
Definition: pagesize.h:23
@ PaperColorMetaData
Returns (QColor) the paper color if set in Settings or the default color (white) if option is true (o...
Definition: generator.h:543
QString message
The DocumentInfo structure can be filled in by generators to display metadata about the currently ope...
Definition: document.h:74
@ None
The page size is not defined in a physical metric.
Definition: generator.h:368
@ PrintNative
Whether the Generator supports native cross-platform printing (QPainter-based).
Definition: generator.h:207
Rotation
A rotation.
Definition: global.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Oct 6 2022 03:56:40 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.