okular
Okular::TextDocumentGenerator Class Reference
#include <textdocumentgenerator.h>

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 115 of file textdocumentgenerator.h.
Public Member Functions | |
| TextDocumentGenerator (TextDocumentConverter *converter, QObject *parent, const QVariantList &args) | |
| virtual | ~TextDocumentGenerator () |
| bool | loadDocument (const QString &fileName, QVector< Okular::Page * > &pagesVector) |
| bool | canGeneratePixmap () const |
| void | generatePixmap (Okular::PixmapRequest *request) |
| bool | print (QPrinter &printer) |
| Okular::ExportFormat::List | exportFormats () const |
| bool | exportTo (const QString &fileName, const Okular::ExportFormat &format) |
| const Okular::DocumentInfo * | generateDocumentInfo () |
| const Okular::DocumentSynopsis * | generateDocumentSynopsis () |
Protected Member Functions | |
| bool | doCloseDocument () |
| Okular::TextPage * | textPage (Okular::Page *page) |
Constructor & Destructor Documentation
| TextDocumentGenerator::TextDocumentGenerator | ( | TextDocumentConverter * | converter, | |
| QObject * | parent, | |||
| const QVariantList & | args | |||
| ) |
Creates a new generator that uses the specified converter.
- Note:
- the generator will take ownership of the converter, so you don't have to delete it yourself
Definition at line 190 of file textdocumentgenerator.cpp.
| TextDocumentGenerator::~TextDocumentGenerator | ( | ) | [virtual] |
Definition at line 214 of file textdocumentgenerator.cpp.
Member Function Documentation
| bool TextDocumentGenerator::loadDocument | ( | const QString & | fileName, | |
| QVector< Okular::Page * > & | pagesVector | |||
| ) | [virtual] |
Loads the document with the given fileName and fills the pagesVector with the parsed pages.
- Returns:
- true on success, false otherwise.
Implements Okular::Generator.
Definition at line 218 of file textdocumentgenerator.cpp.
| bool TextDocumentGenerator::canGeneratePixmap | ( | ) | const [virtual] |
This method returns whether the generator is ready to handle a new pixmap request.
Reimplemented from Okular::Generator.
Definition at line 282 of file textdocumentgenerator.cpp.
| void TextDocumentGenerator::generatePixmap | ( | Okular::PixmapRequest * | request | ) | [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 287 of file textdocumentgenerator.cpp.
| bool TextDocumentGenerator::print | ( | QPrinter & | printer | ) | [virtual] |
This method is called to print the document to the given printer.
Reimplemented from Okular::Generator.
Definition at line 323 of file textdocumentgenerator.cpp.
| Okular::ExportFormat::List TextDocumentGenerator::exportFormats | ( | ) | const [virtual] |
Returns the list of additional supported export formats.
Reimplemented from Okular::Generator.
Definition at line 349 of file textdocumentgenerator.cpp.
| bool TextDocumentGenerator::exportTo | ( | const QString & | fileName, | |
| const Okular::ExportFormat & | format | |||
| ) | [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 360 of file textdocumentgenerator.cpp.
| const Okular::DocumentInfo * TextDocumentGenerator::generateDocumentInfo | ( | ) | [virtual] |
Returns the general information object of the document or 0 if no information are available.
Reimplemented from Okular::Generator.
Definition at line 334 of file textdocumentgenerator.cpp.
| const Okular::DocumentSynopsis * TextDocumentGenerator::generateDocumentSynopsis | ( | ) | [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 340 of file textdocumentgenerator.cpp.
| bool TextDocumentGenerator::doCloseDocument | ( | ) | [protected, virtual] |
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 268 of file textdocumentgenerator.cpp.
| Okular::TextPage * TextDocumentGenerator::textPage | ( | Okular::Page * | page | ) | [protected, virtual] |
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 317 of file textdocumentgenerator.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference