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

okular

Okular::TextDocumentConverter

Okular::TextDocumentConverter Class Reference

#include <textdocumentgenerator.h>

Inheritance diagram for Okular::TextDocumentConverter:

Inheritance graph
[legend]

List of all members.


Detailed Description

Definition at line 27 of file textdocumentgenerator.h.


Signals

void addAction (Action *link, int cursorBegin, int cursorEnd)
void addAnnotation (Annotation *annotation, int cursorBegin, int cursorEnd)
void addTitle (int level, const QString &title, const QTextBlock &position)
void addMetaData (const QString &key, const QString &value, const QString &title)
void error (const QString &message, int duration)
void warning (const QString &message, int duration)
void notice (const QString &message, int duration)

Public Member Functions

 TextDocumentConverter ()
 ~TextDocumentConverter ()
virtual QTextDocument * convert (const QString &fileName)=0

Protected Member Functions

DocumentViewport calculateViewport (QTextDocument *document, const QTextBlock &block)

Constructor & Destructor Documentation

TextDocumentConverter::TextDocumentConverter (  ) 

Creates a new generic converter.

Generic Converter Implementation.

Definition at line 33 of file textdocumentgenerator.cpp.

TextDocumentConverter::~TextDocumentConverter (  ) 

Destroys the generic converter.

Definition at line 38 of file textdocumentgenerator.cpp.


Member Function Documentation

virtual QTextDocument* Okular::TextDocumentConverter::convert ( const QString &  fileName  )  [pure virtual]

Returns the generated QTextDocument object.

void Okular::TextDocumentConverter::addAction ( Action *  link,
int  cursorBegin,
int  cursorEnd 
) [signal]

Adds a new link object which is located between cursorBegin and cursorEnd to the generator.

void Okular::TextDocumentConverter::addAnnotation ( Annotation *  annotation,
int  cursorBegin,
int  cursorEnd 
) [signal]

Adds a new annotation object which is located between cursorBegin and cursorEnd to the generator.

void Okular::TextDocumentConverter::addTitle ( int  level,
const QString &  title,
const QTextBlock &  position 
) [signal]

Adds a new title at the given level which is located as position to the generator.

void Okular::TextDocumentConverter::addMetaData ( const QString &  key,
const QString &  value,
const QString &  title 
) [signal]

Adds a set of meta data to the generator.

void Okular::TextDocumentConverter::error ( const QString &  message,
int  duration 
) [signal]

This signal should be emitted whenever an error occurred in the converter.

Parameters:
message The message which should be shown to the user.
duration The time that the message should be shown to the user.

void Okular::TextDocumentConverter::warning ( const QString &  message,
int  duration 
) [signal]

This signal should be emitted whenever the user should be warned.

Parameters:
message The message which should be shown to the user.
duration The time that the message should be shown to the user.

void Okular::TextDocumentConverter::notice ( const QString &  message,
int  duration 
) [signal]

This signal should be emitted whenever the user should be noticed.

Parameters:
message The message which should be shown to the user.
duration The time that the message should be shown to the user.

DocumentViewport TextDocumentConverter::calculateViewport ( QTextDocument *  document,
const QTextBlock &  block 
) [protected]

This method can be used to calculate the viewport for a given text block.

Note:
This method should be called at the end of the convertion, because it triggers QTextDocument to do the layout calculation.

Definition at line 43 of file textdocumentgenerator.cpp.


The documentation for this class was generated from the following files:
  • textdocumentgenerator.h
  • textdocumentgenerator.cpp

okular

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

kdegraphics

Skip menu "kdegraphics"
  • okular
Generated for kdegraphics by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal