Okular::ObjectRect
#include <area.h>
Public Types | |
enum | ObjectType { Action , Image , OAnnotation , SourceRef } |
Public Member Functions | |
ObjectRect (const NormalizedRect &r, bool ellipse, ObjectType type, void *object) | |
ObjectRect (const ObjectRect &o)=delete | |
ObjectRect (const QPolygonF &poly, ObjectType type, void *object) | |
ObjectRect (double left, double top, double right, double bottom, bool ellipse, ObjectType type, void *object) | |
virtual | ~ObjectRect () |
virtual QRect | boundingRect (double xScale, double yScale) const |
virtual bool | contains (double x, double y, double xScale, double yScale) const |
double | distanceSqr (double x, double y, double xScale, double yScale) const |
const void * | object () const |
ObjectType | objectType () const |
ObjectRect & | operator= (const ObjectRect &o)=delete |
const QPainterPath & | region () const |
virtual void | transform (const QTransform &matrix) |
Protected Attributes | |
void * | m_object |
ObjectType | m_objectType |
QPainterPath | m_path |
QPainterPath | m_transformedPath |
Detailed Description
An area with normalized coordinates that contains a reference to an object.
These areas ("rects") contain a pointer to a document object (such as a hyperlink, an action, or something like that). The pointer is read and stored as 'void pointer' so cast is performed by accessors based on the value returned by objectType(). Objects are reparented to this class.
Type / Class correspondence tab:
- Action : class Action: description of an action
- Image : class Image : description of an image (n/a)
- Annotation: class Annotation: description of an annotation
For more information about the normalized coordinate system, see NormalizedPoint.
- See also
- NormalizedPoint
Member Enumeration Documentation
◆ ObjectType
Constructor & Destructor Documentation
◆ ObjectRect() [1/3]
ObjectRect::ObjectRect | ( | double | left, |
double | top, | ||
double | right, | ||
double | bottom, | ||
bool | ellipse, | ||
ObjectType | type, | ||
void * | object ) |
Creates a new object rectangle.
class ObjectRect
- Parameters
-
left The left coordinate of the rectangle. top The top coordinate of the rectangle. right The right coordinate of the rectangle. bottom The bottom coordinate of the rectangle. ellipse If true the rectangle describes an ellipse. type The type of the storable object
- See also
- ObjectType.
- Parameters
-
object The pointer to the storable object.
◆ ObjectRect() [2/3]
ObjectRect::ObjectRect | ( | const NormalizedRect & | r, |
bool | ellipse, | ||
ObjectType | type, | ||
void * | object ) |
◆ ObjectRect() [3/3]
ObjectRect::ObjectRect | ( | const QPolygonF & | poly, |
ObjectType | type, | ||
void * | object ) |
◆ ~ObjectRect()
|
virtual |
Member Function Documentation
◆ boundingRect()
|
virtual |
Returns the bounding rect of the object rectangle for the scaling factor xScale
and yScale
.
Reimplemented in Okular::AnnotationObjectRect, and Okular::SourceRefObjectRect.
◆ contains()
|
virtual |
Returns whether the object rectangle contains the point with absolute coordinates (x
, y
) at a page size of xScale
x yScale
.
Reimplemented in Okular::AnnotationObjectRect, and Okular::SourceRefObjectRect.
◆ distanceSqr()
double ObjectRect::distanceSqr | ( | double | x, |
double | y, | ||
double | xScale, | ||
double | yScale ) const |
◆ object()
const void * ObjectRect::object | ( | ) | const |
◆ objectType()
ObjectRect::ObjectType ObjectRect::objectType | ( | ) | const |
Returns the object type of the object rectangle.
- See also
- ObjectType
◆ region()
const QPainterPath & ObjectRect::region | ( | ) | const |
◆ transform()
|
virtual |
Transforms the object rectangle with the operations defined by matrix
.
Reimplemented in Okular::AnnotationObjectRect.
Member Data Documentation
◆ m_object
◆ m_objectType
|
protected |
◆ m_path
|
protected |
◆ m_transformedPath
|
protected |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.