okular
#include <area.h>

Public Types | |
enum | ObjectType { Action, Image, OAnnotation, SourceRef } |
Public Member Functions | |
ObjectRect (double left, double top, double right, double bottom, bool ellipse, ObjectType type, void *object) | |
ObjectRect (const NormalizedRect &rect, bool ellipse, ObjectType type, void *object) | |
ObjectRect (const QPolygonF &poly, 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 |
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
NormalizedRect that contains a reference to an object.
These rects contains a pointer to a okular object (such as 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 correspondency tab:
- Action : class Action: description of an action
- Image : class Image : description of an image (n/a)
- Annotation: class Annotation: description of an annotation
Member Enumeration Documentation
Constructor & Destructor Documentation
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::ObjectRect | ( | const NormalizedRect & | rect, |
bool | ellipse, | ||
ObjectType | type, | ||
void * | object | ||
) |
ObjectRect::ObjectRect | ( | const QPolygonF & | poly, |
ObjectType | type, | ||
void * | object | ||
) |
|
virtual |
Member Function Documentation
|
virtual |
Returns the bounding rect of the object rectangle for the scaling factor xScale
and yScale
.
Reimplemented in Okular::SourceRefObjectRect, and Okular::AnnotationObjectRect.
|
virtual |
Returns whether the object rectangle contains the point x
, y
for the scaling factor xScale
and yScale
.
Reimplemented in Okular::SourceRefObjectRect, and Okular::AnnotationObjectRect.
double ObjectRect::distanceSqr | ( | double | x, |
double | y, | ||
double | xScale, | ||
double | yScale | ||
) | const |
const void * ObjectRect::object | ( | ) | const |
ObjectRect::ObjectType ObjectRect::objectType | ( | ) | const |
Returns the object type of the object rectangle.
- See also
- ObjectType
const QPainterPath & ObjectRect::region | ( | ) | const |
|
virtual |
Transforms the object rectangle with the operations defined by matrix
.
Reimplemented in Okular::AnnotationObjectRect.
Member Data Documentation
|
protected |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.