Okular::AnnotationUtils

Search for usage in LXR

Okular::AnnotationUtils Class Reference

#include <annotations.h>

Static Public Member Functions

static QRect annotationGeometry (const Annotation *annotation, double scaleX, double scaleY)
 
static AnnotationcreateAnnotation (const QDomElement &element)
 
static QDomElement findChildElement (const QDomNode &parentNode, const QString &name)
 
static QPixmap loadStamp (const QString &nameOrPath, int size, bool keepAspectRatio=true)
 
static void storeAnnotation (const Annotation *annotation, QDomElement &element, QDomDocument &document)
 

Detailed Description

Helper class for (recursive) annotation retrieval/storage.

Definition at line 49 of file annotations.h.

Member Function Documentation

◆ annotationGeometry()

QRect AnnotationUtils::annotationGeometry ( const Annotation * annotation,
double scaleX,
double scaleY )
static

Returns the geometry of the given annotation scaled by scaleX and scaleY.

Definition at line 155 of file annotations.cpp.

◆ createAnnotation()

Annotation * AnnotationUtils::createAnnotation ( const QDomElement & element)
static

Restore an annotation (with revisions if needed) from the dom element.

Returns a pointer to the complete annotation or 0 if element is invalid.

Definition at line 93 of file annotations.cpp.

◆ findChildElement()

QDomElement AnnotationUtils::findChildElement ( const QDomNode & parentNode,
const QString & name )
static

Returns the child element with the given name from the direct children of parentNode or a null element if not found.

Definition at line 140 of file annotations.cpp.

◆ loadStamp()

QPixmap AnnotationUtils::loadStamp ( const QString & nameOrPath,
int size,
bool keepAspectRatio = true )
static

Returns a pixmap for a stamp symbol.

name Name of a Okular stamp symbol, icon or path to an image size Size of the pixmap side keepAspectRatio Whether to keep aspect ratio of the stamp or not

Since
21.12

Definition at line 168 of file annotations.cpp.

◆ storeAnnotation()

void AnnotationUtils::storeAnnotation ( const Annotation * annotation,
QDomElement & element,
QDomDocument & document )
static

Saves the annotation as a child of element taking care of saving all revisions if it has any.

Definition at line 131 of file annotations.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:35 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.