okular
#include <document.h>
Public Types | |
enum | OpenResult { OpenSuccess, OpenError, OpenNeedsPassword } |
enum | PixmapRequestFlag { NoOption = 0, RemoveAllPrevious = 1 } |
enum | PrintingType { NoPrinting, NativePrinting, PostscriptPrinting } |
enum | SaveCapability { SaveFormsCapability = 1, SaveAnnotationsCapability = 2 } |
enum | SearchStatus { MatchFound, NoMatchFound, SearchCancelled, EndOfDocumentReached } |
enum | SearchType { NextMatch, PreviousMatch, AllDocument, GoogleAll, GoogleAny } |
Public Slots | |
void | cancelSearch () |
void | editFormButtons (int pageNumber, const QList< Okular::FormFieldButton * > &formButtons, const QList< bool > &newButtonStates) |
void | editFormCombo (int pageNumber, Okular::FormFieldChoice *form, const QString &newText, int newCursorPos, int prevCursorPos, int prevAnchorPos) |
void | editFormList (int pageNumber, Okular::FormFieldChoice *form, const QList< int > &newChoices) |
void | editFormText (int pageNumber, Okular::FormFieldText *form, const QString &newContents, int newCursorPos, int prevCursorPos, int prevAnchorPos) |
void | redo () |
void | setPageSize (const PageSize &size) |
void | setRotation (int rotation) |
void | undo () |
Signals | |
void | annotationContentsChangedByUndoRedo (Okular::Annotation *annotation, const QString &contents, int cursorPos, int anchorPos) |
void | canRedoChanged (bool redoAvailable) |
void | canUndoChanged (bool undoAvailable) |
void | close () |
void | error (const QString &text, int duration) |
void | fontReadingEnded () |
void | fontReadingProgress (int page) |
void | formButtonsChangedByUndoRedo (int page, const QList< Okular::FormFieldButton * > &formButtons) |
void | formComboChangedByUndoRedo (int page, Okular::FormFieldChoice *form, const QString &text, int cursorPos, int anchorPos) |
void | formListChangedByUndoRedo (int page, Okular::FormFieldChoice *form, const QList< int > &choices) |
void | formTextChangedByUndoRedo (int page, Okular::FormFieldText *form, const QString &contents, int cursorPos, int anchorPos) |
void | gotFont (const Okular::FontInfo &font) |
void | linkEndPresentation () |
void | linkFind () |
void | linkGoToPage () |
void | linkPresentation () |
void | notice (const QString &text, int duration) |
void | openUrl (const KUrl &url) |
void | processMovieAction (const Okular::MovieAction *action) |
void | processRenditionAction (const Okular::RenditionAction *action) |
void | quit () |
void | searchFinished (int searchID, Okular::Document::SearchStatus endStatus) |
void | sourceReferenceActivated (const QString &absFileName, int line, int col, bool *handled) |
void | warning (const QString &text, int duration) |
Public Member Functions | |
Document (QWidget *widget) | |
~Document () | |
void | addObserver (DocumentObserver *observer) |
void | addPageAnnotation (int page, Annotation *annotation) |
QSizeF | allPagesSize () const |
QList< int > | bookmarkedPageList () const |
QString | bookmarkedPageRange () const |
BookmarkManager * | bookmarkManager () const |
bool | canConfigurePrinter () const |
bool | canExportToText () const |
bool | canModifyPageAnnotation (const Annotation *annotation) const |
bool | canProvideFontInformation () const |
bool | canRedo () const |
bool | canRemovePageAnnotation (const Annotation *annotation) const |
bool | canSaveChanges (SaveCapability cap) const |
bool | canSaveChanges () const |
bool | canUndo () const |
void | closeDocument () |
const KComponentData * | componentData () const |
int | configurableGenerators () const |
void | continueSearch (int searchID) |
void | continueSearch (int searchID, SearchType type) |
KUrl | currentDocument () const |
uint | currentPage () const |
const DocumentInfo * | documentInfo () const |
const DocumentSynopsis * | documentSynopsis () const |
const SourceReference * | dynamicSourceReference (int pageNr, double absX, double absY) |
void | editPageAnnotationContents (int page, Annotation *annotation, const QString &newContents, int newCursorPos, int prevCursorPos, int prevAnchorPos) |
const QList< EmbeddedFile * > * | embeddedFiles () const |
QList< ExportFormat > | exportFormats () const |
bool | exportTo (const QString &fileName, const ExportFormat &format) const |
bool | exportToText (const QString &fileName) const |
void | fillConfigDialog (KConfigDialog *dialog) |
QByteArray | fontData (const FontInfo &font) const |
KXMLGUIClient * | guiClient () |
bool | historyAtBegin () const |
bool | historyAtEnd () const |
bool | isAllowed (Permission action) const |
bool | isOpened () const |
QVariant | metaData (const QString &key, const QVariant &option=QVariant()) const |
void | modifyPageAnnotationProperties (int page, Annotation *annotation) |
OpenResult | openDocument (const QString &docFile, const KUrl &url, const KMimeType::Ptr &mime, const QString &password=QString()) |
OpenResult | openDocumentArchive (const QString &docFile, const KUrl &url, const QString &password=QString()) |
QPrinter::Orientation | orientation () const |
const Page * | page (int number) const |
uint | pages () const |
PageSize::List | pageSizes () const |
QString | pageSizeString (int page) const |
void | prepareToModifyAnnotationProperties (Annotation *annotation) |
bool | print (QPrinter &printer) |
QWidget * | printConfigurationWidget () const |
QString | printError () const |
PrintingType | printingSupport () const |
void | processAction (const Action *action) |
void | processSourceReference (const SourceReference *reference) |
void | registerView (View *view) |
void | removeObserver (DocumentObserver *observer) |
void | removePageAnnotation (int page, Annotation *annotation) |
void | removePageAnnotations (int page, const QList< Annotation * > &annotations) |
void | reparseConfig () |
void | requestPixmaps (const QLinkedList< PixmapRequest * > &requests) |
void | requestPixmaps (const QLinkedList< PixmapRequest * > &requests, PixmapRequestFlags reqOptions) |
void | requestTextPage (uint number) |
void | resetSearch (int searchID) |
Rotation | rotation () const |
bool | saveChanges (const QString &fileName) |
bool | saveChanges (const QString &fileName, QString *errorText) |
bool | saveDocumentArchive (const QString &fileName) |
void | searchText (int searchID, const QString &text, bool fromStart, Qt::CaseSensitivity caseSensitivity, SearchType type, bool moveViewport, const QColor &color) |
void | setAnnotationEditingEnabled (bool enable) |
void | setNextDocumentDestination (const QString &namedDestination) |
void | setNextDocumentViewport (const DocumentViewport &viewport) |
void | setNextViewport () |
void | setPageTextSelection (int page, RegularAreaRect *rect, const QColor &color) |
void | setPrevViewport () |
void | setViewport (const DocumentViewport &viewport, DocumentObserver *excludeObserver=0, bool smoothMove=false) |
void | setViewportPage (int page, DocumentObserver *excludeObserver=0, bool smoothMove=false) |
void | setVisiblePageRects (const QVector< VisiblePageRect * > &visiblePageRects, DocumentObserver *excludeObserver=0) |
void | setZoom (int factor, DocumentObserver *excludeObserver=0) |
void | startFontReading () |
void | stopFontReading () |
QStringList | supportedMimeTypes () const |
bool | supportsPageSizes () const |
bool | supportsPrintToFile () const |
bool | supportsSearching () const |
bool | supportsTiles () const |
void | translatePageAnnotation (int page, Annotation *annotation, const Okular::NormalizedPoint &delta) |
void | unregisterView (View *view) |
const DocumentViewport & | viewport () const |
const QVector< VisiblePageRect * > & | visiblePageRects () const |
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 |
Additional Inherited Members | |
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 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) |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QObject | |
objectName | |
Detailed Description
The Document.
Heart of everything. Actions take place here.
The Document is the main object in Okular. All views query the Document to get data/properties or even for accessing pages (in a 'const' way).
It is designed to keep it detached from the document type (pdf, ps, you name it..) so whenever you want to get some data, it asks its internals generator to do the job and return results in a format-indepedent way.
Apart from the generator (the currently running one) the document stores all the Pages ('Page' class) of the current document in a vector and notifies all the registered DocumentObservers when some content changes.
For a better understanding of hieracies
- See also
- README.internals.png
- DocumentObserver, Page
Definition at line 84 of file document.h.
Member Enumeration Documentation
Describes the result of an open document operation.
- Since
- 0.20 (KDE 4.14)
Enumerator | |
---|---|
OpenSuccess | |
OpenError | |
OpenNeedsPassword |
Definition at line 103 of file document.h.
Describes the possible options for the pixmap requests.
Enumerator | |
---|---|
NoOption |
No options. |
RemoveAllPrevious |
Remove all the previous requests, even for non requested page pixmaps. |
Definition at line 354 of file document.h.
What type of printing a document supports.
Enumerator | |
---|---|
NoPrinting |
Printing Not Supported. |
NativePrinting |
Native Cross-Platform Printing. |
PostscriptPrinting |
Postscript file printing. |
Definition at line 560 of file document.h.
Saving capabilities.
Their availability varies according to the underlying generator and/or the document type.
- See also
- canSaveChanges (SaveCapability)
- Since
- 0.15 (KDE 4.9)
Enumerator | |
---|---|
SaveFormsCapability |
Can save form changes. |
SaveAnnotationsCapability |
Can save annotation changes. |
Definition at line 623 of file document.h.
Describes how search ended.
Definition at line 488 of file document.h.
Describes the possible search types.
Definition at line 476 of file document.h.
Constructor & Destructor Documentation
|
explicit |
Creates a new document with the given widget
as widget to relay GUI things (messageboxes, ...).
Definition at line 2051 of file document.cpp.
Document::~Document | ( | ) |
Destroys the document.
Definition at line 2066 of file document.cpp.
Member Function Documentation
void Document::addObserver | ( | DocumentObserver * | observer | ) |
Registers a new observer
for the document.
Definition at line 2484 of file document.cpp.
void Document::addPageAnnotation | ( | int | page, |
Annotation * | annotation | ||
) |
Adds a new annotation
to the given page
.
Definition at line 2967 of file document.cpp.
QSizeF Document::allPagesSize | ( | ) | const |
If all pages have the same size this method returns it, if the page sizes differ an empty size object is returned.
Definition at line 2804 of file document.cpp.
|
signal |
This signal is emmitted whenever the contents of the given annotation
are changed by an undo or redo action.
The new contents (contents
), cursor position (cursorPos
), and anchor position (anchorPos
) are included
- Since
- 0.17 (KDE 4.11)
QList< int > Document::bookmarkedPageList | ( | ) | const |
Returns a list of the bookmarked.pages.
Definition at line 3516 of file document.cpp.
QString Document::bookmarkedPageRange | ( | ) | const |
Returns the range of the bookmarked.pages.
Definition at line 3532 of file document.cpp.
BookmarkManager * Document::bookmarkManager | ( | ) | const |
Returns the bookmark manager of the document.
Definition at line 3511 of file document.cpp.
|
slot |
Cancels the current search.
Definition at line 3448 of file document.cpp.
bool Document::canConfigurePrinter | ( | ) | const |
Returns whether the document can configure the printer itself.
Definition at line 2566 of file document.cpp.
bool Document::canExportToText | ( | ) | const |
Returns whether the document supports the export to ASCII text.
Definition at line 2749 of file document.cpp.
bool Document::canModifyPageAnnotation | ( | const Annotation * | annotation | ) | const |
Tests if the annotation
can be modified.
- Since
- 0.15 (KDE 4.9)
Definition at line 2977 of file document.cpp.
bool Document::canProvideFontInformation | ( | ) | const |
Whether the current document can provide information about the fonts used in it.
Definition at line 2657 of file document.cpp.
bool Document::canRedo | ( | ) | const |
Returns true if there is a redo command available; otherwise returns false.
- Since
- 0.17 (KDE 4.11)
Definition at line 3144 of file document.cpp.
|
signal |
This signal is emmitted whenever the availability of the redo function changes.
- Since
- 0.17 (KDE 4.11)
bool Document::canRemovePageAnnotation | ( | const Annotation * | annotation | ) | const |
Tests if the annotation
can be removed.
- Since
- 0.15 (KDE 4.9)
Definition at line 3051 of file document.cpp.
bool Document::canSaveChanges | ( | SaveCapability | cap | ) | const |
Returns whether it's possible to save a given category of changes to another document.
- Since
- 0.15 (KDE 4.9)
Definition at line 4022 of file document.cpp.
bool Document::canSaveChanges | ( | ) | const |
Returns whether the changes to the document (modified annotations, values in form fields, etc) can be saved to another document.
Equivalent to the logical OR of canSaveChanges(SaveCapability) for each capability.
- Since
- 0.7 (KDE 4.1)
Definition at line 4007 of file document.cpp.
bool Document::canUndo | ( | ) | const |
Returns true if there is an undo command available; otherwise returns false.
- Since
- 0.17 (KDE 4.11)
Definition at line 3139 of file document.cpp.
|
signal |
This signal is emmitted whenever the availability of the undo function changes.
- Since
- 0.17 (KDE 4.11)
|
signal |
This signal is emitted whenever an action requests a document close operation.
void Document::closeDocument | ( | ) |
Closes the document.
Definition at line 2347 of file document.cpp.
const KComponentData * Document::componentData | ( | ) | const |
Returns the component data associated with the generator.
May be null.
Definition at line 3991 of file document.cpp.
int Document::configurableGenerators | ( | ) | const |
Returns the number of generators that have a configuration widget.
Definition at line 3963 of file document.cpp.
void Document::continueSearch | ( | int | searchID | ) |
Continues the search for the given searchID
.
Definition at line 3385 of file document.cpp.
void Document::continueSearch | ( | int | searchID, |
SearchType | type | ||
) |
Continues the search for the given searchID
, optionally specifying a new type for the search.
- Since
- 0.7 (KDE 4.1)
Definition at line 3402 of file document.cpp.
KUrl Document::currentDocument | ( | ) | const |
Returns the url of the currently opened document.
Definition at line 2705 of file document.cpp.
uint Document::currentPage | ( | ) | const |
Returns the number of the current page.
Definition at line 2695 of file document.cpp.
const DocumentInfo * Document::documentInfo | ( | ) | const |
Returns the meta data of the document or 0 if no meta data are available.
Definition at line 2577 of file document.cpp.
const DocumentSynopsis * Document::documentSynopsis | ( | ) | const |
Returns the table of content of the document or 0 if no table of content is available.
Definition at line 2615 of file document.cpp.
const SourceReference * Document::dynamicSourceReference | ( | int | pageNr, |
double | absX, | ||
double | absY | ||
) |
Asks the generator to dynamically generate a SourceReference for a given page number and absolute X and Y position on this page.
- Attention
- Ownership of the returned SourceReference is transferred to the caller.
- Note
- This method does not call processSourceReference( const SourceReference * )
- Since
- 0.10 (KDE 4.4)
Definition at line 3840 of file document.cpp.
|
slot |
Set the states of the group of form buttons formButtons
on page page
to newButtonStates
.
The lists formButtons
and newButtonStates
should be the same length and true values in newButtonStates
indicate that the corresponding entry in formButtons
should be enabled.
Definition at line 3505 of file document.cpp.
|
slot |
Set the active choice in the combo box form
on page page
to newText
The new cursor position (newCursorPos
), previous cursor position (prevCursorPos
), and previous anchor position (prevAnchorPos
) will be restored by the undo / redo commands.
- Since
- 0.17 (KDE 4.11)
Definition at line 3483 of file document.cpp.
|
slot |
Edit the selected list entries in form
on page page
to be newChoices
.
- Since
- 0.17 (KDE 4.11)
Definition at line 3474 of file document.cpp.
|
slot |
Edit the text contents of the specified form
on page page
to be newContents
.
The new text cursor position (newCursorPos
), previous text cursor position (prevCursorPos
), and previous cursor anchor position will be restored by the undo / redo commands.
- Since
- 0.17 (KDE 4.11)
Definition at line 3463 of file document.cpp.
void Document::editPageAnnotationContents | ( | int | page, |
Annotation * | annotation, | ||
const QString & | newContents, | ||
int | newCursorPos, | ||
int | prevCursorPos, | ||
int | prevAnchorPos | ||
) |
Edits the plain text contents of the given annotation
on the given page
.
The contents are set to newContents
with cursor position newCursorPos
. The previous cursor position prevCursorPos
and previous anchor position prevAnchorPos
must also be supplied so that they can be restored if the edit action is undone.
The Annotation's internal contents should not be modified prior to calling this method.
- Since
- 0.17 (KDE 4.11)
Definition at line 3038 of file document.cpp.
const QList< EmbeddedFile * > * Document::embeddedFiles | ( | ) | const |
Returns the list of embedded files or 0 if no embedded files are available.
Definition at line 2662 of file document.cpp.
|
signal |
This signal is emitted whenever an error occurred.
- Parameters
-
text The description of the error. duration The time in seconds the message should be shown to the user.
ExportFormat::List Document::exportFormats | ( | ) | const |
Returns the list of supported export formats.
- See also
- ExportFormat
Definition at line 2770 of file document.cpp.
bool Document::exportTo | ( | const QString & | fileName, |
const ExportFormat & | format | ||
) | const |
Exports the document in the given format
and saves it under fileName
.
Definition at line 2779 of file document.cpp.
bool Document::exportToText | ( | const QString & | fileName | ) | const |
Exports the document as ASCII text and saves it under fileName
.
Definition at line 2758 of file document.cpp.
void Document::fillConfigDialog | ( | KConfigDialog * | dialog | ) |
Fill the KConfigDialog dialog
with the setting pages of the generators.
Definition at line 3932 of file document.cpp.
QByteArray Document::fontData | ( | const FontInfo & | font | ) | const |
Gets the font data for the given font.
- Since
- 0.8 (KDE 4.2)
Definition at line 4092 of file document.cpp.
|
signal |
Reports that the reading of the fonts in the document is finished.
|
signal |
Reports the progress when reading the fonts in the document.
- Parameters
-
page is the page that was just finished to scan for fonts
|
signal |
This signal is emmitted whenever the state of the specified group of form buttons (formButtons
) on the given page
is changed by an undo or redo action.
- Since
- 0.17 (KDE 4.11)
|
signal |
This signal is emmitted whenever the active text
for the given combo form
on the given page
is changed by an undo or redo action.
- Since
- 0.17 (KDE 4.11)
|
signal |
This signal is emmitted whenever the selected choices
for the given list form
on the given page
are changed by an undo or redo action.
- Since
- 0.17 (KDE 4.11)
|
signal |
This signal is emmitted whenever the text contents of the given text form
on the given page
are changed by an undo or redo action.
The new text contents (contents
), cursor position (cursorPos
), and anchor position (anchorPos
) are included
- Since
- 0.17 (KDE 4.11)
|
signal |
Emitted when a new font is found during the reading of the fonts of the document.
KXMLGUIClient * Document::guiClient | ( | ) |
Returns the gui client of the generator, if it provides one.
Definition at line 2336 of file document.cpp.
bool Document::historyAtBegin | ( | ) | const |
Returns whether the document history is at the begin.
Definition at line 2784 of file document.cpp.
bool Document::historyAtEnd | ( | ) | const |
Returns whether the document history is at the end.
Definition at line 2789 of file document.cpp.
bool Document::isAllowed | ( | Permission | action | ) | const |
Returns whether the given action
is allowed in the document.
- See also
- Permission
Definition at line 2710 of file document.cpp.
bool Document::isOpened | ( | ) | const |
Returns whether the document is currently opened.
Definition at line 2561 of file document.cpp.
|
signal |
This signal is emitted whenever an action requests an end presentation operation.
|
signal |
This signal is emitted whenever an action requests a find operation.
|
signal |
This signal is emitted whenever an action requests a goto operation.
|
signal |
This signal is emitted whenever an action requests a start presentation operation.
Returns the meta data for the given key
and option
or an empty variant if the key doesn't exists.
Definition at line 2794 of file document.cpp.
void Document::modifyPageAnnotationProperties | ( | int | page, |
Annotation * | annotation | ||
) |
Modifies the given annotation
on the given page
.
Must be preceded by a call to prepareToModifyAnnotationProperties before the annotation's properties are modified
- Since
- 0.17 (KDE 4.11)
Definition at line 3013 of file document.cpp.
|
signal |
This signal is emitted to signal a notice.
- Parameters
-
text The description of the notice. duration The time in seconds the message should be shown to the user.
Document::OpenResult Document::openDocument | ( | const QString & | docFile, |
const KUrl & | url, | ||
const KMimeType::Ptr & | mime, | ||
const QString & | password = QString() |
||
) |
Document::OpenResult Document::openDocumentArchive | ( | const QString & | docFile, |
const KUrl & | url, | ||
const QString & | password = QString() |
||
) |
|
signal |
This signal is emitted whenever an action requests an open url operation for the given document url
.
QPrinter::Orientation Document::orientation | ( | ) | const |
Returns the orientation of the document (for printing purposes).
This is used in the KPart to initialize the print dialog and in the generators to check whether the document needs to be rotated or not.
- Since
- 0.14 (KDE 4.8)
Definition at line 4282 of file document.cpp.
const Page * Document::page | ( | int | number | ) | const |
Returns the page object for the given page number
or 0 if the number is out of range.
Definition at line 2667 of file document.cpp.
uint Document::pages | ( | ) | const |
Returns the number of pages of the document.
Definition at line 2700 of file document.cpp.
PageSize::List Document::pageSizes | ( | ) | const |
Returns the list of supported page sizes or an empty list if this feature is not available.
- See also
- supportsPageSizes()
Definition at line 2738 of file document.cpp.
QString Document::pageSizeString | ( | int | page | ) | const |
Returns the size string for the given page
or an empty string if the page is out of range.
Definition at line 2821 of file document.cpp.
void Document::prepareToModifyAnnotationProperties | ( | Annotation * | annotation | ) |
Prepares to modify the properties of the given annotation
.
Must be called before the annotation's properties are modified
- Since
- 0.17 (KDE 4.11)
Definition at line 3002 of file document.cpp.
bool Document::print | ( | QPrinter & | printer | ) |
Prints the document to the given printer
.
Definition at line 3877 of file document.cpp.
QWidget * Document::printConfigurationWidget | ( | ) | const |
Returns a custom printer configuration page or 0 if no custom printer configuration page is available.
Definition at line 3921 of file document.cpp.
QString Document::printError | ( | ) | const |
Returns the last print error in case print() failed.
- Since
- 0.11 (KDE 4.5)
Definition at line 3882 of file document.cpp.
Document::PrintingType Document::printingSupport | ( | ) | const |
Returns what sort of printing the document supports: Native, Postscript, None.
Definition at line 3850 of file document.cpp.
void Document::processAction | ( | const Action * | action | ) |
Processes the given action
.
Definition at line 3578 of file document.cpp.
|
signal |
This signal is emitted whenever an movie action is triggered and the UI should process it.
|
signal |
This signal is emitted whenever an rendition action is triggered and the UI should process it.
- Since
- 0.16 (KDE 4.10)
void Document::processSourceReference | ( | const SourceReference * | reference | ) |
Processes/Executes the given source reference
.
Definition at line 3779 of file document.cpp.
|
signal |
This signal is emitted whenever an action requests an application quit operation.
|
slot |
void Document::registerView | ( | View * | view | ) |
Register the specified view
for the current document.
It is unregistered from the previous document, if any.
- Since
- 0.7 (KDE 4.1)
Definition at line 4060 of file document.cpp.
void Document::removeObserver | ( | DocumentObserver * | observer | ) |
Unregisters the given observer
for the document.
Definition at line 2497 of file document.cpp.
void Document::removePageAnnotation | ( | int | page, |
Annotation * | annotation | ||
) |
Removes the given annotation
from the given page
.
Definition at line 3073 of file document.cpp.
void Document::removePageAnnotations | ( | int | page, |
const QList< Annotation * > & | annotations | ||
) |
Removes the given annotations
from the given page
.
Definition at line 3079 of file document.cpp.
void Document::reparseConfig | ( | ) |
Reparses and applies the configuration.
Definition at line 2527 of file document.cpp.
void Document::requestPixmaps | ( | const QLinkedList< PixmapRequest * > & | requests | ) |
Sends requests
for pixmap generation.
The same as requestPixmaps( requests, RemoveAllPrevious );
Definition at line 2834 of file document.cpp.
void Document::requestPixmaps | ( | const QLinkedList< PixmapRequest * > & | requests, |
PixmapRequestFlags | reqOptions | ||
) |
Sends requests
for pixmap generation.
- Parameters
-
reqOptions the options for the request
- Since
- 0.7 (KDE 4.1)
Definition at line 2839 of file document.cpp.
void Document::requestTextPage | ( | uint | number | ) |
Sends a request for text page generation for the given page number
.
Definition at line 2946 of file document.cpp.
void Document::resetSearch | ( | int | searchID | ) |
Resets the search for the given searchID
.
Definition at line 3419 of file document.cpp.
Rotation Document::rotation | ( | ) | const |
Returns the current rotation of the document.
Definition at line 2799 of file document.cpp.
bool Document::saveChanges | ( | const QString & | fileName | ) |
Save the document and the optional changes to it to the specified fileName
.
- Since
- 0.7 (KDE 4.1)
Definition at line 4039 of file document.cpp.
Save the document and the optional changes to it to the specified fileName
and returns a errorText
if fails.
- Since
- 0.10 (KDE 4.4)
Definition at line 4045 of file document.cpp.
bool Document::saveDocumentArchive | ( | const QString & | fileName | ) |
|
signal |
Reports that the current search finished.
void Document::searchText | ( | int | searchID, |
const QString & | text, | ||
bool | fromStart, | ||
Qt::CaseSensitivity | caseSensitivity, | ||
SearchType | type, | ||
bool | moveViewport, | ||
const QColor & | color | ||
) |
Searches the given text
in the document.
- Parameters
-
searchID The unique id for this search request. fromStart Whether the search should be started at begin of the document. caseSensitivity Whether the search is case sensitive. type The type of the search. SearchType moveViewport Whether the viewport shall be moved to the position of the matches. color The highlighting color of the matches.
Definition at line 3285 of file document.cpp.
void Document::setAnnotationEditingEnabled | ( | bool | enable | ) |
Control annotation editing (creation, modification and removal), which is enabled by default.
- Since
- 0.15 (KDE 4.9)
Definition at line 4304 of file document.cpp.
void Document::setNextDocumentDestination | ( | const QString & | namedDestination | ) |
Sets the next namedDestination
in the viewport history.
- Since
- 0.9 (KDE 4.3)
Definition at line 3280 of file document.cpp.
void Document::setNextDocumentViewport | ( | const DocumentViewport & | viewport | ) |
Sets the next viewport
in the viewport history.
Definition at line 3275 of file document.cpp.
void Document::setNextViewport | ( | ) |
Sets the current document viewport to the previous viewport in the viewport history.
Definition at line 3256 of file document.cpp.
|
slot |
This slot is called whenever the user changes the page size
of the document.
Definition at line 4481 of file document.cpp.
void Document::setPageTextSelection | ( | int | page, |
RegularAreaRect * | rect, | ||
const QColor & | color | ||
) |
Sets the text selection for the given page
.
- Parameters
-
rect The rectangle of the selection. color The color of the selection.
Definition at line 3123 of file document.cpp.
void Document::setPrevViewport | ( | ) |
Sets the current document viewport to the next viewport in the viewport history.
Definition at line 3239 of file document.cpp.
|
slot |
This slot is called whenever the user changes the rotation
of the document.
Definition at line 4449 of file document.cpp.
void Document::setViewport | ( | const DocumentViewport & | viewport, |
DocumentObserver * | excludeObserver = 0 , |
||
bool | smoothMove = false |
||
) |
Sets the current document viewport to the given viewport
.
- Parameters
-
excludeObserver The observer which shouldn't be effected by this change. smoothMove Whether the move shall be animated smoothly.
Definition at line 3176 of file document.cpp.
void Document::setViewportPage | ( | int | page, |
DocumentObserver * | excludeObserver = 0 , |
||
bool | smoothMove = false |
||
) |
Sets the current document viewport to the given page
.
- Parameters
-
excludeObserver The observer ids which shouldn't be effected by this change. smoothMove Whether the move shall be animated smoothly.
Definition at line 3164 of file document.cpp.
void Document::setVisiblePageRects | ( | const QVector< VisiblePageRect * > & | visiblePageRects, |
DocumentObserver * | excludeObserver = 0 |
||
) |
Sets the list of visible page rectangles.
- See also
- VisiblePageRect
Definition at line 2682 of file document.cpp.
void Document::setZoom | ( | int | factor, |
DocumentObserver * | excludeObserver = 0 |
||
) |
Sets the zoom for the current document.
Definition at line 3231 of file document.cpp.
|
signal |
This signal is emitted whenever a source reference with the given parameters has been activated.
- Parameters
-
handled should be set to 'true' if a slot handles this source reference; the default action to launch the configured editor will then not be performed by the document
- Since
- 0.14 (KDE 4.8)
void Document::startFontReading | ( | ) |
Starts the reading of the information about the fonts in the document, if available.
The results as well the end of the reading is notified using the signals gotFont(), fontReadingProgress() and fontReadingEnded()
Definition at line 2620 of file document.cpp.
void Document::stopFontReading | ( | ) |
Force the termination of the reading of the information about the fonts in the document, if running.
Definition at line 2646 of file document.cpp.
QStringList Document::supportedMimeTypes | ( | ) | const |
Returns the list with the supported MIME types.
Definition at line 3970 of file document.cpp.
bool Document::supportsPageSizes | ( | ) | const |
Returns whether the document supports the listing of page sizes.
Definition at line 2728 of file document.cpp.
bool Document::supportsPrintToFile | ( | ) | const |
Returns whether the document supports printing to both PDF and PS files.
Definition at line 3872 of file document.cpp.
bool Document::supportsSearching | ( | ) | const |
Returns whether the document supports searching.
Definition at line 2723 of file document.cpp.
bool Document::supportsTiles | ( | ) | const |
Returns whether the current document supports tiles.
- Since
- 0.16 (KDE 4.10)
Definition at line 2733 of file document.cpp.
void Document::translatePageAnnotation | ( | int | page, |
Annotation * | annotation, | ||
const Okular::NormalizedPoint & | delta | ||
) |
Translates the position of the given annotation
on the given page
by a distance delta
in normalized coordinates.
Consecutive translations applied to the same annotation
are merged together on the undo stack if the BeingMoved flag is set on the annotation
- Since
- 0.17 (KDE 4.11)
Definition at line 3031 of file document.cpp.
|
slot |
void Document::unregisterView | ( | View * | view | ) |
Unregister the specified view
from the current document.
- Since
- 0.7 (KDE 4.1)
Definition at line 4079 of file document.cpp.
const DocumentViewport & Document::viewport | ( | ) | const |
Returns the current viewport of the document.
Definition at line 2672 of file document.cpp.
const QVector< VisiblePageRect * > & Document::visiblePageRects | ( | ) | const |
Returns the list of visible page rectangles.
Definition at line 2677 of file document.cpp.
void Document::walletDataForFile | ( | const QString & | fileName, |
QString * | walletName, | ||
QString * | walletFolder, | ||
QString * | walletKey | ||
) | const |
Returns which wallet data to use to read/write the password for the given fileName.
- Since
- 0.20 (KDE 4.14)
Definition at line 4310 of file document.cpp.
|
signal |
This signal is emitted to signal a warning.
- Parameters
-
text The description of the warning. duration The time in seconds the message should be shown to the user.
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.