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

okular

  • Okular
  • ObjectRect
Public Types | Public Member Functions | Protected Attributes | List of all members
Okular::ObjectRect Class Reference

#include <area.h>

Inheritance diagram for Okular::ObjectRect:
Inheritance graph
[legend]

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

Definition at line 337 of file area.h.

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 343 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
leftThe left coordinate of the rectangle.
topThe top coordinate of the rectangle.
rightThe right coordinate of the rectangle.
bottomThe bottom coordinate of the rectangle.
ellipseIf true the rectangle describes an ellipse.
typeThe type of the storable object
See also
ObjectType.
Parameters
objectThe pointer to the storable object.

Definition at line 313 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 326 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 338 of file area.cpp.

ObjectRect::~ObjectRect ( )
virtual

Destroys the object rectangle.

Definition at line 414 of file area.cpp.

Member Function Documentation

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::SourceRefObjectRect, and Okular::AnnotationObjectRect.

Definition at line 361 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::SourceRefObjectRect, and Okular::AnnotationObjectRect.

Definition at line 369 of file area.cpp.

double ObjectRect::distanceSqr ( double  x,
double  y,
double  xScale,
double  yScale 
) const

Returns the square of the distance between the object and the point x, y for the scaling factor xScale and yScale.

Since
0.8.2 (KDE 4.2.2)

Definition at line 379 of file area.cpp.

const void * ObjectRect::object ( ) const

Returns the storable object of the object rectangle.

Definition at line 351 of file area.cpp.

ObjectRect::ObjectType ObjectRect::objectType ( ) const

Returns the object type of the object rectangle.

See also
ObjectType

Definition at line 346 of file area.cpp.

const QPainterPath & ObjectRect::region ( ) const

Returns the region that is covered by the object rectangle.

Definition at line 356 of file area.cpp.

void ObjectRect::transform ( const QTransform &  matrix)
virtual

Transforms the object rectangle with the operations defined by matrix.

Reimplemented in Okular::AnnotationObjectRect.

Definition at line 374 of file area.cpp.

Member Data Documentation

void* Okular::ObjectRect::m_object
protected

Definition at line 423 of file area.h.

ObjectType Okular::ObjectRect::m_objectType
protected

Definition at line 422 of file area.h.

QPainterPath Okular::ObjectRect::m_path
protected

Definition at line 424 of file area.h.

QPainterPath Okular::ObjectRect::m_transformedPath
protected

Definition at line 425 of file area.h.


The documentation for this class was generated from the following files:
  • area.h
  • area.cpp
This file is part of the KDE documentation.
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.

okular

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

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal