• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdegraphics
  • Sitemap
  • Contact Us
 

okular

Okular::ObjectRect

Okular::ObjectRect Class Reference

#include <area.h>

Inheritance diagram for Okular::ObjectRect:

Inheritance graph
[legend]

List of all members.


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

enum Okular::ObjectRect::ObjectType

Describes the type of storable object.

Enumerator:
Action  An action.
Image  An image.
OAnnotation  An annotation.
SourceRef  A source reference.

Definition at line 232 of file area.h.


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.

Definition at line 214 of file area.cpp.

ObjectRect::ObjectRect ( const NormalizedRect &  rect,
bool  ellipse,
ObjectType  type,
void *  object 
)

This is an overloaded member function, provided for convenience.

Definition at line 227 of file area.cpp.

ObjectRect::ObjectRect ( const QPolygonF &  poly,
ObjectType  type,
void *  object 
)

This is an overloaded member function, provided for convenience.

Definition at line 239 of file area.cpp.

ObjectRect::~ObjectRect (  )  [virtual]

Destroys the object rectangle.

Definition at line 280 of file area.cpp.


Member Function Documentation

ObjectRect::ObjectType ObjectRect::objectType (  )  const

Returns the object type of the object rectangle.

See also:
ObjectType

Definition at line 247 of file area.cpp.

const void * ObjectRect::object (  )  const

Returns the storable object of the object rectangle.

Definition at line 252 of file area.cpp.

const QPainterPath & ObjectRect::region (  )  const

Returns the region that is covered by the object rectangle.

Definition at line 257 of file area.cpp.

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.

Definition at line 262 of file area.cpp.

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.

Definition at line 270 of file area.cpp.

void ObjectRect::transform ( const QMatrix &  matrix  )  [virtual]

Transforms the object rectangle with the operations defined by matrix.

Reimplemented in Okular::AnnotationObjectRect.

Definition at line 275 of file area.cpp.


Member Data Documentation

ObjectType Okular::ObjectRect::m_objectType [protected]

Definition at line 302 of file area.h.

void* Okular::ObjectRect::m_object [protected]

Definition at line 303 of file area.h.

QPainterPath Okular::ObjectRect::m_path [protected]

Definition at line 304 of file area.h.

QPainterPath Okular::ObjectRect::m_transformedPath [protected]

Definition at line 305 of file area.h.


The documentation for this class was generated from the following files:
  • area.h
  • area.cpp

okular

Skip menu "okular"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdegraphics

Skip menu "kdegraphics"
  • okular
Generated for kdegraphics by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal