Okular
document.h
197 * Creates a new document with the given @p widget as widget to relay GUI things (messageboxes, ...).
220 OpenResult openDocument(const QString &docFile, const QUrl &url, const QMimeType &mime, const QString &password = QString());
311 void setVisiblePageRects(const QVector<VisiblePageRect *> &visiblePageRects, DocumentObserver *excludeObserver = nullptr);
429 void setViewportPage(int page, DocumentObserver *excludeObserver = nullptr, bool smoothMove = false);
439 void setViewport(const DocumentViewport &viewport, DocumentObserver *excludeObserver = nullptr, bool smoothMove = false, bool updateHistory = true);
475 RemoveAllPrevious = 1 ///< Remove all the previous requests, even for non requested page pixmaps
533 * Translates the position of the given @p annotation on the given @p page by a distance @p delta in normalized coordinates.
535 * Consecutive translations applied to the same @p annotation are merged together on the undo stack if the
540 void translatePageAnnotation(int page, Annotation *annotation, const Okular::NormalizedPoint &delta);
543 * Adjusts the position of the top-left and bottom-right corners of given @p annotation on the given @p page.
549 * Consecutive adjustments applied to the same @p annotation are merged together on the undo stack if the
554 void adjustPageAnnotation(int page, Annotation *annotation, const Okular::NormalizedPoint &delta1, const Okular::NormalizedPoint &delta2);
567 void editPageAnnotationContents(int page, Annotation *annotation, const QString &newContents, int newCursorPos, int prevCursorPos, int prevAnchorPos);
595 void setPageTextSelection(int page, std::unique_ptr<RegularAreaRect> &&rect, const QColor &color);
640 void searchText(int searchID, const QString &text, bool fromStart, Qt::CaseSensitivity caseSensitivity, SearchType type, bool moveViewport, const QColor &color);
676 OKULARCORE_DEPRECATED void processFormatAction(const Action *action, Okular::FormFieldText *fft);
689 * @deprecated use processKeystrokeAction(const Action *, Okular::FormField *, const QVariant &, int, int)
691 OKULARCORE_DEPRECATED void processKeystrokeAction(const Action *action, Okular::FormFieldText *fft, const QVariant &newValue);
694 * Processes the given keystroke @p action on @p ff between the two positions @p prevCursorPos and @p prevAnchorPos
695 * @p prevCursorPos and @p prevAnchorPos are used to set the selStart and selEnd event properties.
699 void processKeystrokeAction(const Action *action, Okular::FormField *ff, const QVariant &newValue, int prevCursorPos, int prevAnchorPos);
708 OKULARCORE_DEPRECATED void processKeystrokeCommitAction(const Action *action, Okular::FormFieldText *fft);
717 void processKeystrokeCommitAction(const Action *action, Okular::FormField *ff, bool &returnCode);
732 OKULARCORE_DEPRECATED void processValidateAction(const Action *action, Okular::FormFieldText *fft, bool &returnCode);
735 * Validates the input value in the FormField @p ff and sets the @p returnCode for a given validate @p action.
742 * A method that executes the relevant keystroke, validate, calculate and format actions on a FormField @p ff.
754 OKULARCORE_DEPRECATED void processFormMouseUpScripAction(const Action *action, Okular::FormField *ff);
768 void processFormMouseScriptAction(const Action *action, Okular::FormField *ff, MouseEventType fieldMouseEventType);
1016 OpenResult openDocumentArchive(const QString &docFile, const QUrl &url, const QString &password = QString());
1067 void walletDataForFile(const QString &fileName, QString *walletName, QString *walletFolder, QString *walletKey) const;
1163 * The new text cursor position (@p newCursorPos), previous text cursor position (@p prevCursorPos),
1167 * @deprecated use editFormText(int pageNumber, Okular::FormFieldText *form, const QString &newContents,
1170 OKULARCORE_DEPRECATED void editFormText(int pageNumber, Okular::FormFieldText *form, const QString &newContents, int newCursorPos, int prevCursorPos, int prevAnchorPos);
1174 * previous contents are @p oldContents for undo/redo commands. The new text cursor position (@p newCursorPos),
1175 * previous text cursor position (@p prevCursorPos), and previous cursor anchor position will be restored by the undo / redo commands.
1178 void editFormText(int pageNumber, Okular::FormFieldText *form, const QString &newContents, int newCursorPos, int prevCursorPos, int prevAnchorPos, const QString &oldContents);
1184 void editFormList(int pageNumber, Okular::FormFieldChoice *form, const QList<int> &newChoices);
1194 void editFormCombo(int pageNumber, Okular::FormFieldChoice *form, const QString &newText, int newCursorPos, int prevCursorPos, int prevAnchorPos);
1197 * Set the states of the group of form buttons @p formButtons on page @p page to @p newButtonStates.
1199 * in @p newButtonStates indicate that the corresponding entry in @p formButtons should be enabled.
1201 void editFormButtons(int pageNumber, const QList<Okular::FormFieldButton *> &formButtons, const QList<bool> &newButtonStates);
1367 * This signal is emitted whenever the undo history is clean (i.e. the same status the last time it was saved)
1373 * This signal is emitted whenever an rendition action is triggered and the UI should process it.
1380 * This signal is emitted whenever the contents of the given @p annotation are changed by an undo
1383 * The new contents (@p contents), cursor position (@p cursorPos), and anchor position (@p anchorPos) are
1387 void annotationContentsChangedByUndoRedo(Okular::Annotation *annotation, const QString &contents, int cursorPos, int anchorPos);
1390 * This signal is emitted whenever the text contents of the given text @p form on the given @p page
1393 * The new text contents (@p contents), cursor position (@p cursorPos), and anchor position (@p anchorPos) are
1397 void formTextChangedByUndoRedo(int page, Okular::FormFieldText *form, const QString &contents, int cursorPos, int anchorPos);
1404 void formListChangedByUndoRedo(int page, Okular::FormFieldChoice *form, const QList<int> &choices);
1411 void formComboChangedByUndoRedo(int page, Okular::FormFieldChoice *form, const QString &text, int cursorPos, int anchorPos);
1414 * This signal is emitted whenever the state of the specified group of form buttons (@p formButtons) on the
1418 void formButtonsChangedByUndoRedo(int page, const QList<Okular::FormFieldButton *> &formButtons);
1619 explicit VisiblePageRect(int pageNumber = -1, const NormalizedRect &rectangle = NormalizedRect());
Annotation struct holds properties shared by all annotations.
Definition annotations.h:99
A helper class to store information about x509 certificate.
Definition signatureutils.h:520
The DocumentInfo structure can be filled in by generators to display metadata about the currently ope...
Definition document.h:76
@ Creator
The creator of the document (this can be different from the author)
Definition document.h:88
Base class for objects being notified when something changes.
Definition observer.h:29
bool operator==(const DocumentViewport &other) const
Definition document.cpp:5886
DocumentViewport(int number=-1)
Creates a new viewport for the given page number.
Definition document.cpp:5800
const QVector< VisiblePageRect * > & visiblePageRects() const
Returns the list of visible page rectangles.
Definition document.cpp:3037
void fontReadingEnded()
Reports that the reading of the fonts in the document is finished.
const Page * page(int number) const
Returns the page object for the given page number or 0 if the number is out of range.
Definition document.cpp:3027
void error(const QString &text, int duration)
This signal is emitted whenever an error occurred.
void linkEndPresentation()
This signal is emitted whenever an action requests an end presentation operation.
bool exportToText(const QString &fileName) const
Exports the document as ASCII text and saves it under fileName.
Definition document.cpp:3127
PageSize::List pageSizes() const
Returns the list of supported page sizes or an empty list if this feature is not available.
Definition document.cpp:3106
void stopFontReading()
Force the termination of the reading of the information about the fonts in the document,...
Definition document.cpp:3000
void canUndoChanged(bool undoAvailable)
This signal is emitted whenever the availability of the undo function changes.
bool canSign() const
Whether the current document can perform digital signing.
Definition document.cpp:3017
bool supportsSearching() const
Returns whether the document supports searching.
Definition document.cpp:3091
@ RemoveAllPrevious
Remove all the previous requests, even for non requested page pixmaps.
Definition document.h:475
QList< ExportFormat > exportFormats() const
Returns the list of supported export formats.
Definition document.cpp:3141
bool isAllowed(Permission action) const
Returns whether the given action is allowed in the document.
Definition document.cpp:3073
void linkGoToPage()
This signal is emitted whenever an action requests a goto operation.
bool historyAtEnd() const
Returns whether the document history is at the end.
Definition document.cpp:3161
KXMLGUIClient * guiClient()
Returns the gui client of the generator, if it provides one.
Definition document.cpp:2628
void setNextViewport()
Sets the current document viewport to the previous viewport in the viewport history.
Definition document.cpp:3803
void canRedoChanged(bool redoAvailable)
This signal is emitted whenever the availability of the redo function changes.
void linkPresentation()
This signal is emitted whenever an action requests a start presentation operation.
DocumentInfo documentInfo() const
Returns the meta data of the document.
void setVisiblePageRects(const QVector< VisiblePageRect * > &visiblePageRects, DocumentObserver *excludeObserver=nullptr)
Sets the list of visible page rectangles.
Definition document.cpp:3042
DocumentAdditionalActionType
Describes the additional actions available in the Document.
Definition document.h:775
void linkFind()
This signal is emitted whenever an action requests a find operation.
void aboutToClose()
This signal is emitted whenever the document is about to close.
void gotFont(const Okular::FontInfo &font)
Emitted when a new font is found during the reading of the fonts of the document.
const DocumentViewport & viewport() const
Returns the current viewport of the document.
Definition document.cpp:3032
void requestPrint()
This signal is emitted whenever an action requests a document print operation.
void close()
This signal is emitted whenever an action requests a document close operation.
QUrl currentDocument() const
Returns the url of the currently opened document.
Definition document.cpp:3068
void annotationContentsChangedByUndoRedo(Okular::Annotation *annotation, const QString &contents, int cursorPos, int anchorPos)
This signal is emitted whenever the contents of the given annotation are changed by an undo or redo a...
void openUrl(const QUrl &url)
This signal is emitted whenever an action requests an open url operation for the given document url.
void sourceReferenceActivated(const QString &absFileName, int line, int col, bool *handled)
This signal is emitted whenever a source reference with the given parameters has been activated.
void setViewportPage(int page, DocumentObserver *excludeObserver=nullptr, bool smoothMove=false)
Sets the current document viewport to the given page.
Definition document.cpp:3764
const QList< EmbeddedFile * > * embeddedFiles() const
Returns the list of embedded files or 0 if no embedded files are available.
Definition document.cpp:3022
void notice(const QString &text, int duration)
This signal is emitted to signal a notice.
bool historyAtBegin() const
Returns whether the document history is at the begin.
Definition document.cpp:3156
void setNextDocumentDestination(const QString &namedDestination)
Sets the next namedDestination in the viewport history.
Definition document.cpp:3826
void setZoom(int factor, DocumentObserver *excludeObserver=nullptr)
Sets the zoom for the current document.
Definition document.cpp:3777
void requestSaveAs()
This signal is emitted whenever an action requests a document save as operation.
void quit()
This signal is emitted whenever an action requests an application quit operation.
void fontReadingProgress(int page)
Reports the progress when reading the fonts in the document.
bool exportTo(const QString &fileName, const ExportFormat &format) const
Exports the document in the given format and saves it under fileName.
Definition document.cpp:3151
void setViewport(const DocumentViewport &viewport, DocumentObserver *excludeObserver=nullptr, bool smoothMove=false, bool updateHistory=true)
Sets the current document viewport to the given viewport.
Definition document.cpp:3712
bool supportsPageSizes() const
Returns whether the document supports the listing of page sizes.
Definition document.cpp:3096
Document(QWidget *widget)
Creates a new document with the given widget as widget to relay GUI things (messageboxes,...
Definition document.cpp:2267
void warning(const QString &text, int duration)
This signal is emitted to signal a warning.
QVariant metaData(const QString &key, const QVariant &option=QVariant()) const
Returns the meta data for the given key and option or an empty variant if the key doesn't exists.
Definition document.cpp:3166
void searchFinished(int searchID, Okular::Document::SearchStatus endStatus)
Reports that the current search finished.
const DocumentSynopsis * documentSynopsis() const
Returns the table of content of the document or 0 if no table of content is available.
Definition document.cpp:2970
void refreshFormWidget(Okular::FormField *field)
This signal is emitted whenever a FormField was changed programmatically and the according widget sho...
QSizeF allPagesSize() const
If all pages have the same size this method returns it, if the page sizes differ an empty size object...
Definition document.cpp:3236
QString pageSizeString(int page) const
Returns the size string for the given page or an empty string if the page is out of range.
Definition document.cpp:3255
bool supportsTiles() const
Returns whether the current document supports tiles.
Definition document.cpp:3101
void setPrevViewport()
Sets the current document viewport to the next viewport in the viewport history.
Definition document.cpp:3787
void undoHistoryCleanChanged(bool clean)
This signal is emitted whenever the undo history is clean (i.e.
void setNextDocumentViewport(const DocumentViewport &viewport)
Sets the next viewport in the viewport history.
Definition document.cpp:3821
bool canExportToText() const
Returns whether the document supports the export to ASCII text.
Definition document.cpp:3117
void processMovieAction(const Okular::MovieAction *action)
This signal is emitted whenever an movie action is triggered and the UI should process it.
void formComboChangedByUndoRedo(int page, Okular::FormFieldChoice *form, const QString &text, int cursorPos, int anchorPos)
This signal is emitted whenever the active text for the given combo form on the given page is changed...
void formButtonsChangedByUndoRedo(int page, const QList< Okular::FormFieldButton * > &formButtons)
This signal is emitted whenever the state of the specified group of form buttons (formButtons) on the...
void processRenditionAction(const Okular::RenditionAction *action)
This signal is emitted whenever an rendition action is triggered and the UI should process it.
void startFontReading()
Starts the reading of the information about the fonts in the document, if available.
Definition document.cpp:2975
bool canProvideFontInformation() const
Whether the current document can provide information about the fonts used in it.
Definition document.cpp:3012
void formTextChangedByUndoRedo(int page, Okular::FormFieldText *form, const QString &contents, int cursorPos, int anchorPos)
This signal is emitted whenever the text contents of the given text form on the given page are change...
void formListChangedByUndoRedo(int page, Okular::FormFieldChoice *form, const QList< int > &choices)
This signal is emitted whenever the selected choices for the given list form on the given page are ch...
virtual int size() const =0
Returns the size (in bytes) of the file, if available, or -1 otherwise.
virtual QDateTime creationDate() const =0
Returns the creation date of the file, or an invalid date if not available.
virtual QDateTime modificationDate() const =0
Returns the modification date of the file, or an invalid date if not available.
virtual QString description() const =0
Returns the description of the file, or an empty string if not available.
virtual QByteArray data() const =0
Returns the real data representing the file contents.
The Movie action executes an operation on a video on activation.
Definition action.h:469
QString documentPassword() const
Definition document.cpp:6247
void setReason(const QString &reason)
Definition document.cpp:6272
void setDocumentPassword(const QString &password)
Definition document.cpp:6252
void setLocation(const QString &location)
Definition document.cpp:6262
void setLeftFontSize(double fontSize)
Definition document.cpp:6302
QString backgroundImagePath() const
Definition document.cpp:6277
void setBackgroundImagePath(const QString &path)
Definition document.cpp:6282
NormalizedPoint is a helper class which stores the coordinates of a normalized point.
Definition area.h:117
A NormalizedRect is a rectangle which can be defined by two NormalizedPoints.
Definition area.h:189
The Rendition action executes an operation on a video or executes some JavaScript code on activation.
Definition action.h:523
VisiblePageRect(int pageNumber=-1, const NormalizedRect &rectangle=NormalizedRect())
Creates a new visible page rectangle.
Definition document.cpp:6163
QDomDocument()
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Orientation
CaseSensitivity
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:33 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:33 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.