okular
Okular::ObjectRect Class Reference
#include <area.h>

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
Definition at line 226 of file 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 () |
| ObjectType | objectType () const |
| const void * | object () const |
| const QPainterPath & | region () const |
| virtual QRect | boundingRect (double xScale, double yScale) const |
| virtual bool | contains (double x, double y, double xScale, double yScale) const |
| virtual void | transform (const QMatrix &matrix) |
Protected Attributes | |
| ObjectType | m_objectType |
| void * | m_object |
| QPainterPath | m_path |
| QPainterPath | m_transformedPath |
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 | |||
| ) |
| ObjectRect::~ObjectRect | ( | ) | [virtual] |
Member Function Documentation
| ObjectRect::ObjectType ObjectRect::objectType | ( | ) | const |
| const void * ObjectRect::object | ( | ) | const |
| const QPainterPath & ObjectRect::region | ( | ) | const |
| QRect ObjectRect::boundingRect | ( | double | xScale, | |
| double | yScale | |||
| ) | const [virtual] |
Returns the bounding rect of the object rectangle for the scaling factor xScale and yScale.
Reimplemented in Okular::AnnotationObjectRect, and Okular::SourceRefObjectRect.
| bool ObjectRect::contains | ( | double | x, | |
| double | y, | |||
| double | xScale, | |||
| double | yScale | |||
| ) | const [virtual] |
Returns whether the object rectangle contains the point x, y for the scaling factor xScale and yScale.
Reimplemented in Okular::AnnotationObjectRect, and Okular::SourceRefObjectRect.
| void ObjectRect::transform | ( | const QMatrix & | matrix | ) | [virtual] |
Transforms the object rectangle with the operations defined by matrix.
Reimplemented in Okular::AnnotationObjectRect.
Member Data Documentation
ObjectType Okular::ObjectRect::m_objectType [protected] |
void* Okular::ObjectRect::m_object [protected] |
QPainterPath Okular::ObjectRect::m_path [protected] |
QPainterPath Okular::ObjectRect::m_transformedPath [protected] |
The documentation for this class was generated from the following files:
KDE 4.0 API Reference