• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

okular

  • Okular
  • TextDocumentGenerator
Public Member Functions | Protected Member Functions | List of all members
Okular::TextDocumentGenerator Class Reference

#include <textdocumentgenerator.h>

Inheritance diagram for Okular::TextDocumentGenerator:
Inheritance graph
[legend]

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 ()
 
- Public Member Functions inherited from Okular::Generator
 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)
 
- Public Member Functions inherited from Okular::ConfigInterface
virtual ~ConfigInterface ()
 

Protected Member Functions

bool doCloseDocument ()
 
Okular::TextPage * textPage (Okular::Page *page)
 
- Protected Member Functions inherited from Okular::Generator
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
 

Additional Inherited Members

- Public Types inherited from Okular::Generator
enum  GeneratorFeature {
  Threaded, TextExtraction, ReadRawData, FontInfo,
  PageSizes, PrintNative, PrintPostscript, PrintToFile,
  TiledRendering
}
 
enum  PageSizeMetric { None, Points }
 
enum  PrintError {
  NoPrintError, UnknownPrintError, TemporaryFileOpenPrintError, FileConversionPrintError,
  PrintingProcessCrashPrintError, PrintingProcessStartPrintError, PrintToFilePrintError, InvalidPrinterStatePrintError,
  UnableToFindFilePrintError, NoFileToPrintError, NoBinaryToPrintError, InvalidPageSizePrintError
}
 
- Signals inherited from Okular::Generator
void error (const QString &message, int duration)
 
void notice (const QString &message, int duration)
 
void warning (const QString &message, int duration)
 
- Protected Slots inherited from Okular::Generator
const SourceReference * dynamicSourceReference (int pageNr, double absX, double absY)
 
Okular::Generator::PrintError printError () const
 
void requestFontData (const Okular::FontInfo &font, QByteArray *data)
 

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.

TextDocumentGenerator::~TextDocumentGenerator ( )
virtual

Definition at line 270 of file textdocumentgenerator.cpp.

Member Function Documentation

void TextDocumentGenerator::addPages ( KConfigDialog *  dlg)
virtual

Does nothing by default. You need to reimplement it in your generator.

Implements Okular::ConfigInterface.

Definition at line 520 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 358 of file textdocumentgenerator.cpp.

bool TextDocumentGenerator::doCloseDocument ( )
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.

Okular::ExportFormat::List TextDocumentGenerator::exportFormats ( ) const
virtual

Returns the list of additional supported export formats.

Reimplemented from Okular::Generator.

Definition at line 448 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 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.

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 423 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 429 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 363 of file textdocumentgenerator.cpp.

bool TextDocumentGenerator::loadDocument ( const QString &  fileName,
QVector< Okular::Page * > &  pagesVector 
)

Definition at line 274 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 412 of file textdocumentgenerator.cpp.

bool TextDocumentGenerator::reparseConfig ( )
virtual

By default checks if the default font has changed or not.

Implements Okular::ConfigInterface.

Definition at line 507 of file textdocumentgenerator.cpp.

Okular::TextPage * TextDocumentGenerator::textPage ( Okular::Page *  page)
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:
  • textdocumentgenerator.h
  • textdocumentgenerator.cpp
This file is part of the KDE documentation.
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.

okular

Skip menu "okular"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal