okular
#include <textdocumentgenerator.h>

Public Member Functions | |
TextDocumentGenerator (TextDocumentConverter *converter, const QString &configName, QObject *parent, const QVariantList &args) | |
KDE_DEPRECATED | TextDocumentGenerator (TextDocumentConverter *converter, QObject *parent, const QVariantList &args) |
virtual | ~TextDocumentGenerator () |
void | addPages (KConfigDialog *dlg) |
bool | canGeneratePixmap () const |
Okular::ExportFormat::List | exportFormats () const |
bool | exportTo (const QString &fileName, const Okular::ExportFormat &format) |
TextDocumentSettings * | generalSettings () |
const Okular::DocumentInfo * | generateDocumentInfo () |
const Okular::DocumentSynopsis * | generateDocumentSynopsis () |
void | generatePixmap (Okular::PixmapRequest *request) |
bool | loadDocument (const QString &fileName, QVector< Okular::Page * > &pagesVector) |
bool | print (QPrinter &printer) |
bool | reparseConfig () |
![]() | |
Generator (QObject *parent, const QVariantList &args) | |
virtual | ~Generator () |
virtual bool | canGenerateTextPage () const |
bool | closeDocument () |
virtual const QList < EmbeddedFile * > * | embeddedFiles () const |
virtual FontInfo::List | fontsForPage (int page) |
virtual void | generateTextPage (Page *page) |
bool | hasFeature (GeneratorFeature feature) const |
virtual bool | isAllowed (Permission action) const |
virtual bool | loadDocument (const QString &fileName, QVector< Page * > &pagesVector)=0 |
virtual bool | loadDocumentFromData (const QByteArray &fileData, QVector< Page * > &pagesVector) |
virtual QVariant | metaData (const QString &key, const QVariant &option) const |
virtual void | pageSizeChanged (const PageSize &pageSize, const PageSize &oldPageSize) |
virtual PageSize::List | pageSizes () const |
virtual PageSizeMetric | pagesSizeMetric () const |
virtual void | rotationChanged (Rotation orientation, Rotation oldOrientation) |
![]() | |
virtual | ~ConfigInterface () |
Protected Member Functions | |
bool | doCloseDocument () |
Okular::TextPage * | textPage (Okular::Page *page) |
![]() | |
const Document * | document () const |
QVariant | documentMetaData (const QString &key, const QVariant &option=QVariant()) const |
virtual QImage | image (PixmapRequest *page) |
void | setFeature (GeneratorFeature feature, bool on=true) |
void | signalPixmapRequestDone (PixmapRequest *request) |
void | signalTextGenerationDone (Page *page, TextPage *textPage) |
void | updatePageBoundingBox (int page, const NormalizedRect &boundingBox) |
QMutex * | userMutex () const |
Detailed Description
QTextDocument-based Generator.
This generator provides a document in the form of a QTextDocument object, parsed using a specialized TextDocumentConverter.
Definition at line 136 of file textdocumentgenerator.h.
Constructor & Destructor Documentation
TextDocumentGenerator::TextDocumentGenerator | ( | TextDocumentConverter * | converter, |
const QString & | configName, | ||
QObject * | parent, | ||
const QVariantList & | args | ||
) |
Creates a new generator that uses the specified converter
.
- Parameters
-
configName - see Okular::TextDocumentSettings
- Note
- the generator will take ownership of the converter, so you don't have to delete it yourself
- Since
- 0.17 (KDE 4.11)
Definition at line 253 of file textdocumentgenerator.cpp.
TextDocumentGenerator::TextDocumentGenerator | ( | TextDocumentConverter * | converter, |
QObject * | parent, | ||
const QVariantList & | args | ||
) |
Creates a new generator that uses the specified converter
.
- Deprecated:
- use the one with configName
- Note
- the generator will take ownership of the converter, so you don't have to delete it yourself
Definition at line 262 of file textdocumentgenerator.cpp.
|
virtual |
Definition at line 270 of file textdocumentgenerator.cpp.
Member Function Documentation
|
virtual |
Does nothing by default. You need to reimplement it in your generator.
Implements Okular::ConfigInterface.
Definition at line 520 of file textdocumentgenerator.cpp.
|
virtual |
This method returns whether the generator is ready to handle a new pixmap request.
Reimplemented from Okular::Generator.
Definition at line 358 of file textdocumentgenerator.cpp.
|
protectedvirtual |
This method is called when the document is closed and not used any longer.
- Returns
- true on success, false otherwise.
Implements Okular::Generator.
Definition at line 340 of file textdocumentgenerator.cpp.
|
virtual |
Returns the list of additional supported export formats.
Reimplemented from Okular::Generator.
Definition at line 448 of file textdocumentgenerator.cpp.
|
virtual |
This method is called to export the document in the given format
and save it under the given fileName
.
The format must be one of the supported export formats.
Reimplemented from Okular::Generator.
Definition at line 467 of file textdocumentgenerator.cpp.
TextDocumentSettings * TextDocumentGenerator::generalSettings | ( | ) |
Config skeleton for TextDocumentSettingsWidget.
You must use new construtor to initialize TextDocumentSettings, that contain
- Parameters
-
configName.
- Since
- 0.17 (KDE 4.11)
Definition at line 526 of file textdocumentgenerator.cpp.
|
virtual |
Returns the general information object of the document or 0 if no information are available.
Reimplemented from Okular::Generator.
Definition at line 423 of file textdocumentgenerator.cpp.
|
virtual |
Returns the 'table of content' object of the document or 0 if no table of content is available.
Reimplemented from Okular::Generator.
Definition at line 429 of file textdocumentgenerator.cpp.
|
virtual |
This method can be called to trigger the generation of a new pixmap as described by request
.
We create the text page for every page that is visible to the user, so he can use the text extraction tools without a delay.
Reimplemented from Okular::Generator.
Definition at line 363 of file textdocumentgenerator.cpp.
bool TextDocumentGenerator::loadDocument | ( | const QString & | fileName, |
QVector< Okular::Page * > & | pagesVector | ||
) |
Definition at line 274 of file textdocumentgenerator.cpp.
|
virtual |
This method is called to print the document to the given printer
.
Reimplemented from Okular::Generator.
Definition at line 412 of file textdocumentgenerator.cpp.
|
virtual |
By default checks if the default font has changed or not.
Implements Okular::ConfigInterface.
Definition at line 507 of file textdocumentgenerator.cpp.
|
protectedvirtual |
Returns the text page for the given page
.
- Warning
- this method may be executed in its own separated thread if the Threaded is enabled!
Reimplemented from Okular::Generator.
Definition at line 406 of file textdocumentgenerator.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.