kspread
KSpread::RectStorage< T > Class Template Reference
A custom rectangular storage. More...
#include <RectStorage.h>

Public Member Functions | |
| RectStorage (const RectStorage &other) | |
| RectStorage (Map *map) | |
| virtual | ~RectStorage () |
| QPair< QRectF, T > | containedPair (const QPoint &point) const |
| T | contains (const QPoint &point) const |
| void | insert (const Region ®ion, const T &data) |
| QList< QPair< QRectF, T > > | insertColumns (int position, int number) |
| QList< QPair< QRectF, T > > | insertRows (int position, int number) |
| QList< QPair< QRectF, T > > | insertShiftDown (const QRect &rect) |
| QList< QPair< QRectF, T > > | insertShiftRight (const QRect &rect) |
| QList< QPair< QRectF, T > > | intersectingPairs (const Region ®ion) const |
| void | remove (const Region ®ion, const T &data) |
| QList< QPair< QRectF, T > > | removeColumns (int position, int number) |
| QList< QPair< QRectF, T > > | removeRows (int position, int number) |
| QList< QPair< QRectF, T > > | removeShiftLeft (const QRect &rect) |
| QList< QPair< QRectF, T > > | removeShiftUp (const QRect &rect) |
| QList< QPair< QRectF, T > > | undoData (const Region ®ion) const |
| QRect | usedArea () const |
Protected Member Functions | |
| virtual void | garbageCollection () |
| void | invalidateCache (const QRect &rect) |
| void | regionChanged (const QRect &rect) |
| virtual void | triggerGarbageCollection () |
Detailed Description
template<typename T>
class KSpread::RectStorage< T >
A custom rectangular storage.
Based on an R-Tree data structure. Usable for any kind of data attached to rectangular regions.
Acts mainly as a wrapper around the R-Tree data structure to allow a future replacement of this backend. Decorated with some additional features like garbage collection, caching, used area tracking, etc.
- Note:
- For data assigned to points use PointStorage.
Definition at line 52 of file RectStorage.h.
Constructor & Destructor Documentation
| KSpread::RectStorage< T >::RectStorage | ( | Map * | map | ) | [inline, explicit] |
Definition at line 166 of file RectStorage.h.
| KSpread::RectStorage< T >::RectStorage | ( | const RectStorage< T > & | other | ) | [inline] |
Definition at line 172 of file RectStorage.h.
| KSpread::RectStorage< T >::~RectStorage | ( | ) | [inline, virtual] |
Definition at line 181 of file RectStorage.h.
Member Function Documentation
| QPair< QRectF, T > KSpread::RectStorage< T >::containedPair | ( | const QPoint & | point | ) | const [inline] |
- Returns:
- the stored rect/value pair at the position
point.
Definition at line 205 of file RectStorage.h.
| T KSpread::RectStorage< T >::contains | ( | const QPoint & | point | ) | const [inline] |
- Returns:
- the stored value at the position
point.
Definition at line 186 of file RectStorage.h.
| void KSpread::RectStorage< T >::garbageCollection | ( | ) | [inline, protected, virtual] |
Reimplemented in KSpread::BindingStorage, KSpread::ConditionsStorage, KSpread::DatabaseStorage, KSpread::CommentStorage, KSpread::FusionStorage, KSpread::MatrixStorage, and KSpread::ValidityStorage.
Definition at line 503 of file RectStorage.h.
| void KSpread::RectStorage< T >::insert | ( | const Region & | region, | |
| const T & | data | |||
| ) | [inline] |
Assigns data to region .
Definition at line 247 of file RectStorage.h.
| QList< QPair< QRectF, T > > KSpread::RectStorage< T >::insertColumns | ( | int | position, | |
| int | number | |||
| ) | [inline] |
Inserts number columns at the position position .
It extends or shifts rectangles, respectively.
Definition at line 320 of file RectStorage.h.
| QList< QPair< QRectF, T > > KSpread::RectStorage< T >::insertRows | ( | int | position, | |
| int | number | |||
| ) | [inline] |
Inserts number rows at the position position .
It extends or shifts rectangles, respectively.
Definition at line 290 of file RectStorage.h.
| QList< QPair< QRectF, T > > KSpread::RectStorage< T >::insertShiftDown | ( | const QRect & | rect | ) | [inline] |
Shifts the columns at the bottom of rect to the bottom by the height of rect .
It extends or shifts rectangles, respectively.
Definition at line 430 of file RectStorage.h.
| QList< QPair< QRectF, T > > KSpread::RectStorage< T >::insertShiftRight | ( | const QRect & | rect | ) | [inline] |
Shifts the rows right of rect to the right by the width of rect .
It extends or shifts rectangles, respectively.
Definition at line 404 of file RectStorage.h.
| QList< QPair< QRectF, T > > KSpread::RectStorage< T >::intersectingPairs | ( | const Region & | region | ) | const [inline] |
Definition at line 212 of file RectStorage.h.
| void KSpread::RectStorage< T >::invalidateCache | ( | const QRect & | rect | ) | [inline, protected] |
Invalidates all cached styles lying in rect .
Definition at line 580 of file RectStorage.h.
| void KSpread::RectStorage< T >::regionChanged | ( | const QRect & | rect | ) | [inline, protected] |
Triggers all necessary actions after a change of rect .
Calls invalidateCache() and adds the data in rect to the list of possible garbage.
Definition at line 566 of file RectStorage.h.
| void KSpread::RectStorage< T >::remove | ( | const Region & | region, | |
| const T & | data | |||
| ) | [inline] |
Removes data from region .
Definition at line 274 of file RectStorage.h.
| QList< QPair< QRectF, T > > KSpread::RectStorage< T >::removeColumns | ( | int | position, | |
| int | number | |||
| ) | [inline] |
Deletes number columns at the position position .
It shrinks or shifts rectangles, respectively.
Definition at line 377 of file RectStorage.h.
| QList< QPair< QRectF, T > > KSpread::RectStorage< T >::removeRows | ( | int | position, | |
| int | number | |||
| ) | [inline] |
Deletes number rows at the position position .
It shrinks or shifts rectangles, respectively.
Definition at line 350 of file RectStorage.h.
| QList< QPair< QRectF, T > > KSpread::RectStorage< T >::removeShiftLeft | ( | const QRect & | rect | ) | [inline] |
Shifts the rows left of rect to the left by the width of rect .
It shrinks or shifts rectangles, respectively.
- Returns:
- the former rectangle/data pairs
Definition at line 456 of file RectStorage.h.
| QList< QPair< QRectF, T > > KSpread::RectStorage< T >::removeShiftUp | ( | const QRect & | rect | ) | [inline] |
Shifts the columns on top of rect to the top by the height of rect .
It shrinks or shifts rectangles, respectively.
- Returns:
- the former rectangle/data pairs
Definition at line 477 of file RectStorage.h.
| void KSpread::RectStorage< T >::triggerGarbageCollection | ( | ) | [inline, protected, virtual] |
Reimplemented in KSpread::BindingStorage, KSpread::ConditionsStorage, KSpread::DatabaseStorage, KSpread::CommentStorage, KSpread::FusionStorage, KSpread::MatrixStorage, and KSpread::ValidityStorage.
Definition at line 498 of file RectStorage.h.
| QList< QPair< QRectF, T > > KSpread::RectStorage< T >::undoData | ( | const Region & | region | ) | const [inline] |
Definition at line 222 of file RectStorage.h.
| QRect KSpread::RectStorage< T >::usedArea | ( | ) | const [inline] |
Returns the area, which got data attached.
- Returns:
- the area using data
Definition at line 241 of file RectStorage.h.
The documentation for this class was generated from the following file:
