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) |
Document::OpenResult | loadDocumentWithPassword (const QString &fileName, QVector< Okular::Page * > &pagesVector, const QString &password) |
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) |
virtual bool | loadDocumentFromData (const QByteArray &fileData, QVector< Page * > &pagesVector) |
virtual Document::OpenResult | loadDocumentFromDataWithPassword (const QByteArray &fileData, QVector< Page * > &pagesVector, const QString &password) |
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) |
void | setDPI (const QSizeF &dpi) |
virtual void | walletDataForFile (const QString &fileName, QString *walletName, QString *walletFolder, QString *walletKey) const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
virtual | ~QObject () |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
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 |
QSizeF | dpi () 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 |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Public Types inherited from Okular::Generator | |
enum | GeneratorFeature { Threaded, TextExtraction, ReadRawData, FontInfo, PageSizes, PrintNative, PrintPostscript, PrintToFile, TiledRendering } |
enum | PageSizeMetric { None, Points, Pixels } |
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) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
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) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
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 153 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 275 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 284 of file textdocumentgenerator.cpp.
|
virtual |
Definition at line 292 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 553 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 383 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 365 of file textdocumentgenerator.cpp.
|
virtual |
Returns the list of additional supported export formats.
Reimplemented from Okular::Generator.
Definition at line 481 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 500 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 559 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 456 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 462 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 388 of file textdocumentgenerator.cpp.
|
virtual |
Loads the document with the given fileName
and password
and fills the pagesVector
with the parsed pages.
- Note
- Do not implement this if your format doesn't support passwords, it'll cleanly call loadDocument()
- Since
- 0.20 (KDE 4.14)
- Returns
- a LoadResult defining the result of the operation
Reimplemented from Okular::Generator.
Definition at line 296 of file textdocumentgenerator.cpp.
|
virtual |
This method is called to print the document to the given printer
.
Reimplemented from Okular::Generator.
Definition at line 445 of file textdocumentgenerator.cpp.
|
virtual |
By default checks if the default font has changed or not.
Implements Okular::ConfigInterface.
Definition at line 540 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 439 of file textdocumentgenerator.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.