Okular::RegularArea

Okular::RegularArea< NormalizedShape, Shape > Class Template Reference

#include <area.h>

Inheritance diagram for Okular::RegularArea< NormalizedShape, Shape >:

Public Member Functions

void appendArea (const RegularArea< NormalizedShape, Shape > *area)
 
void appendShape (const NormalizedShape &shape, MergeSide side=MergeAll)
 
bool contains (double x, double y) const
 
bool contains (const NormalizedShape &shape) const
 
QList< Shape > geometry (int xScale, int yScale, int dx=0, int dy=0) const
 
bool intersects (const RegularArea< NormalizedShape, Shape > *area) const
 
bool intersects (const NormalizedShape &shape) const
 
bool isNull () const
 
void simplify ()
 
void transform (const QTransform &matrix)
 
- Public Member Functions inherited from QList< NormalizedShape >
 QList (const QList< T > &other)
 
 QList (std::initializer_list< T > args)
 
 QList (InputIterator first, InputIterator last)
 
 QList (QList< T > &&other)
 
void append (const T &value)
 
void append (const QList< T > &value)
 
const T & at (int i) const const
 
T & back ()
 
const T & back () const const
 
QList::iterator begin ()
 
QList::const_iterator begin () const const
 
QList::const_iterator cbegin () const const
 
QList::const_iterator cend () const const
 
void clear ()
 
QList::const_iterator constBegin () const const
 
QList::const_iterator constEnd () const const
 
const T & constFirst () const const
 
const T & constLast () const const
 
bool contains (const T &value) const const
 
int count (const T &value) const const
 
int count () const const
 
QList::const_reverse_iterator crbegin () const const
 
QList::const_reverse_iterator crend () const const
 
bool empty () const const
 
QList::iterator end ()
 
QList::const_iterator end () const const
 
bool endsWith (const T &value) const const
 
QList::iterator erase (QList::iterator pos)
 
QList::iterator erase (QList::iterator begin, QList::iterator end)
 
const T & first () const const
 
T & first ()
 
T & front ()
 
const T & front () const const
 
int indexOf (const T &value, int from) const const
 
void insert (int i, const T &value)
 
QList::iterator insert (QList::iterator before, const T &value)
 
bool isEmpty () const const
 
T & last ()
 
const T & last () const const
 
int lastIndexOf (const T &value, int from) const const
 
int length () const const
 
QList< T > mid (int pos, int length) const const
 
void move (int from, int to)
 
bool operator!= (const QList< T > &other) const const
 
QList< T > operator+ (const QList< T > &other) const const
 
QList< T > & operator+= (const QList< T > &other)
 
QList< T > & operator+= (const T &value)
 
bool operator< (const QList< T > &lhs, const QList< T > &rhs)
 
QDataStreamoperator<< (QDataStream &out, const QList< T > &list)
 
QList< T > & operator<< (const QList< T > &other)
 
QList< T > & operator<< (const T &value)
 
bool operator<= (const QList< T > &lhs, const QList< T > &rhs)
 
QList< T > & operator= (QList< T > &&other)
 
QList< T > & operator= (const QList< T > &other)
 
bool operator== (const QList< T > &other) const const
 
bool operator> (const QList< T > &lhs, const QList< T > &rhs)
 
bool operator>= (const QList< T > &lhs, const QList< T > &rhs)
 
QDataStreamoperator>> (QDataStream &in, QList< T > &list)
 
const T & operator[] (int i) const const
 
T & operator[] (int i)
 
void pop_back ()
 
void pop_front ()
 
void prepend (const T &value)
 
void push_back (const T &value)
 
void push_front (const T &value)
 
uint qHash (const QList< T > &key, uint seed)
 
QList::reverse_iterator rbegin ()
 
QList::const_reverse_iterator rbegin () const const
 
int removeAll (const T &value)
 
void removeAt (int i)
 
void removeFirst ()
 
void removeLast ()
 
bool removeOne (const T &value)
 
QList::const_reverse_iterator rend () const const
 
QList::reverse_iterator rend ()
 
void replace (int i, const T &value)
 
void reserve (int alloc)
 
int size () const const
 
bool startsWith (const T &value) const const
 
void swap (int i, int j)
 
void swap (QList< T > &other)
 
void swapItemsAt (int i, int j)
 
takeAt (int i)
 
takeFirst ()
 
takeLast ()
 
QSet< T > toSet () const const
 
std::list< T > toStdList () const const
 
QVector< T > toVector () const const
 
value (int i) const const
 
value (int i, const T &defaultValue) const const
 

Additional Inherited Members

- Static Public Member Functions inherited from QList< NormalizedShape >
QList< T > fromSet (const QSet< T > &set)
 
QList< T > fromStdList (const std::list< T > &list)
 
QList< T > fromVector (const QVector< T > &vector)
 
- Public Attributes inherited from QList< NormalizedShape >
typedef const_pointer
 
typedef const_reference
 
typedef const_reverse_iterator
 
typedef ConstIterator
 
typedef difference_type
 
typedef Iterator
 
typedef pointer
 
typedef reference
 
typedef reverse_iterator
 
typedef size_type
 
typedef value_type
 

Detailed Description

template<class NormalizedShape, class Shape>
class Okular::RegularArea< NormalizedShape, Shape >

An area with normalized coordinates, consisting of NormalizedShape objects.

This is a template class to describe an area which consists of multiple shapes of the same type, intersecting or non-intersecting. The coordinates are normalized, and can be mapped to a reference area of defined size. For more information about the normalized coordinate system, see NormalizedPoint.

Class NormalizedShape must have the following functions/operators defined:

  • bool contains( double, double ), whether it contains the given NormalizedPoint
  • bool intersects( NormalizedShape )
  • bool isNull()
  • Shape geometry( int, int ), which maps to the reference area
  • operator|=( NormalizedShape ), which unites two NormalizedShape's
See also
RegularAreaRect, NormalizedPoint

Definition at line 666 of file area.h.

Member Function Documentation

template<class NormalizedShape, class Shape>
void Okular::RegularArea< NormalizedShape, Shape >::appendArea ( const RegularArea< NormalizedShape, Shape > *  area)

Appends the given area to this area.

Definition at line 790 of file area.h.

template<class NormalizedShape, class Shape >
void Okular::RegularArea< NormalizedShape, Shape >::appendShape ( const NormalizedShape &  shape,
MergeSide  side = MergeAll 
)

Appends the given shape to this area.

Definition at line 797 of file area.h.

template<class NormalizedShape , class Shape >
bool Okular::RegularArea< NormalizedShape, Shape >::contains ( double  x,
double  y 
) const

Returns whether this area contains the normalized point (x, y).

Definition at line 852 of file area.h.

template<class NormalizedShape, class Shape >
bool Okular::RegularArea< NormalizedShape, Shape >::contains ( const NormalizedShape &  shape) const

Returns whether this area contains a NormalizedShape object that equals shape.

Note
The original NormalizedShape objects can be lost if simplify() was called.

Definition at line 865 of file area.h.

template<class NormalizedShape , class Shape >
QList< Shape > Okular::RegularArea< NormalizedShape, Shape >::geometry ( int  xScale,
int  yScale,
int  dx = 0,
int  dy = 0 
) const

Returns the subareas of this regular area mapped to a reference area of size xScale x yScale, then translated by dx and dy.

Definition at line 873 of file area.h.

template<class NormalizedShape, class Shape>
bool Okular::RegularArea< NormalizedShape, Shape >::intersects ( const RegularArea< NormalizedShape, Shape > *  area) const

Returns whether this area intersects with the given area.

Definition at line 773 of file area.h.

template<class NormalizedShape, class Shape>
bool Okular::RegularArea< NormalizedShape, Shape >::intersects ( const NormalizedShape &  shape) const

Returns whether the regular area intersects with the given shape.

Definition at line 760 of file area.h.

template<class NormalizedShape , class Shape >
bool Okular::RegularArea< NormalizedShape, Shape >::isNull ( ) const

Returns whether the regular area is a null area.

Definition at line 747 of file area.h.

template<class NormalizedShape , class Shape >
void Okular::RegularArea< NormalizedShape, Shape >::simplify ( )

Simplifies this regular area by merging its intersecting subareas.

This might change the effective geometry of this area.

Definition at line 726 of file area.h.

template<class NormalizedShape , class Shape >
void Okular::RegularArea< NormalizedShape, Shape >::transform ( const QTransform matrix)

Transforms the regular area with the operations defined by matrix.

Definition at line 890 of file area.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Sep 25 2020 22:36:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.