kspread
KSpread::Region Class Reference#include <region.h>
Inheritance diagram for KSpread::Region:
List of all members.
Detailed Description
The one for all class for points and ranges.
Definition at line 43 of file region.h.
|
Public Types |
typedef QValueList< Element
* >::Iterator | Iterator |
typedef QValueList< Element
* >::ConstIterator | ConstIterator |
Public Member Functions |
| | Region () |
| | Region (const QPoint &point, Sheet *sheet=0) |
| | Region (const QRect &range, Sheet *sheet=0) |
| | Region (View *view, const QString &strRegion, Sheet *sheet=0) |
| | Region (const Region ®ion) |
| | Region (int col, int row, Sheet *sheet=0) |
| | Region (int col, int row, int width, int height, Sheet *sheet=0) |
| virtual | ~Region () |
| QString | name (Sheet *originSheet=0) const |
| Sheet * | filterSheetName (QString &sRegion) |
| bool | isEmpty () const |
| bool | isSingular () const |
| bool | isContiguous () const |
| bool | isValid () const |
| bool | isColumnSelected (uint col=0) const |
| bool | isRowSelected (uint row=0) const |
| bool | isColumnOrRowSelected () const |
| bool | isColumnAffected (uint col) const |
| bool | isRowAffected (uint row) const |
| bool | contains (const QPoint &point, Sheet *sheet=0) const |
| Element * | add (const QPoint &point, Sheet *sheet=0) |
| Element * | add (const QRect &range, Sheet *sheet=0) |
| Element * | add (const Region ®ion) |
| void | sub (const QPoint &point) |
| void | sub (const QRect &range) |
| void | sub (const Region ®ion) |
| virtual Element * | eor (const QPoint &point, Sheet *sheet=0) |
| virtual void | clear () |
|
QRect | boundingRect () const |
| bool | operator== (const Region ®ion) const |
| void | operator= (const Region ®ion) |
| View * | view () const |
| void | setView (View *) |
|
ConstIterator | constBegin () const |
|
ConstIterator | constEnd () const |
Protected Member Functions |
| QValueList< Element * > & | cells () const |
| Iterator | insert (Iterator iterator, const QPoint &point, Sheet *, bool multi=true) |
| Iterator | insert (Iterator iterator, const QRect &range, Sheet *, bool multi=true) |
|
virtual Point * | createPoint (const QPoint &) const |
|
virtual Point * | createPoint (const QString &) const |
|
virtual Point * | createPoint (const Point &) const |
|
virtual Range * | createRange (const QRect &) const |
|
virtual Range * | createRange (const QString &) const |
|
virtual Range * | createRange (const Range &) const |
Classes |
| class | Element |
| | Base class for region elements, which can be points or ranges. More...
|
| class | Point |
| | A point in a region. More...
|
| class | Range |
| | A range in a region. More...
|
Constructor & Destructor Documentation
| KSpread::Region::Region |
( |
|
) |
|
Constructor.
Creates an empty region.
Definition at line 54 of file region.cc.
| KSpread::Region::Region |
( |
const QPoint & |
point, |
|
|
Sheet * |
sheet = 0 | |
|
) |
| | |
Constructor.
Creates a region consisting of a point. - Parameters:
-
| point | the point's location |
| sheet | the sheet the point belongs to |
Definition at line 126 of file region.cc.
| KSpread::Region::Region |
( |
const QRect & |
range, |
|
|
Sheet * |
sheet = 0 | |
|
) |
| | |
Constructor.
Creates a region consisting of a range. - Parameters:
-
| range | the range's location |
| sheet | the sheet the range belongs to |
Definition at line 114 of file region.cc.
| KSpread::Region::Region |
( |
View * |
view, |
|
|
const QString & |
strRegion, |
|
|
Sheet * |
sheet = 0 | |
|
) |
| | |
Constructor.
Creates a region consisting of the region defined in strRegion . - Parameters:
-
| view | used to determine the sheet, if it's named in the string |
| strRegion | a string representing the region (e.g. "A1:B3") |
| sheet | the sheet the region belongs to |
Definition at line 59 of file region.cc.
| KSpread::Region::Region |
( |
const Region & |
region |
) |
|
Copy Constructor.
Creates a copy of the region. - Parameters:
-
| region | the region to copy |
Definition at line 138 of file region.cc.
| KSpread::Region::Region |
( |
int |
col, |
|
|
int |
row, |
|
|
Sheet * |
sheet = 0 | |
|
) |
| | |
Constructor.
Creates a region consisting of a point. - Parameters:
-
| col | the column of the point |
| row | the row of the point |
| sheet | the sheet the point belongs to |
Definition at line 160 of file region.cc.
| KSpread::Region::Region |
( |
int |
col, |
|
|
int |
row, |
|
|
int |
width, |
|
|
int |
height, |
|
|
Sheet * |
sheet = 0 | |
|
) |
| | |
Constructor.
Creates a region consisting of a range at the location - Parameters:
-
| col | the column of the range' starting point |
| row | the row of the range' starting point |
| width | the width of the range |
| height | the height of the range |
| sheet | the sheet the range belongs to |
Definition at line 172 of file region.cc.
| KSpread::Region::~Region |
( |
|
) |
[virtual] |
Member Function Documentation
| QString KSpread::Region::name |
( |
Sheet * |
originSheet = 0 |
) |
const |
- Parameters:
-
| originSheet | The name is created relative to this sheet. |
- Returns:
- the name of the region (e.g. "A1:A2")
Reimplemented in KSpread::Selection.
Definition at line 233 of file region.cc.
| Sheet * KSpread::Region::filterSheetName |
( |
QString & |
sRegion |
) |
|
- Parameters:
-
| sRegion | will be modified, if a valid sheet was found. |
The sheetname will be removed - Returns:
- sheet named in the
sRegion or the active sheet of the view
Definition at line 691 of file region.cc.
| bool KSpread::Region::isEmpty |
( |
|
) |
const |
- Returns:
true, if this region contains no elements
Definition at line 595 of file region.cc.
| bool KSpread::Region::isSingular |
( |
|
) |
const |
| bool KSpread::Region::isContiguous |
( |
|
) |
const |
- Returns:
true, if this region is contiguous
Definition at line 224 of file region.cc.
| bool KSpread::Region::isValid |
( |
|
) |
const |
- Returns:
true, if this region contains at least one valid point or one valid range
Definition at line 202 of file region.cc.
| bool KSpread::Region::isColumnSelected |
( |
uint |
col = 0 |
) |
const |
- Parameters:
-
- Returns:
true, if the colum col is selected. If column col is not given, it returns true, if at least one column is selected
Definition at line 525 of file region.cc.
| bool KSpread::Region::isRowSelected |
( |
uint |
row = 0 |
) |
const |
- Parameters:
-
- Returns:
true, if the row row is selected. If row row is not given, it returns true, if at least one row is selected
Definition at line 541 of file region.cc.
| bool KSpread::Region::isColumnOrRowSelected |
( |
|
) |
const |
- Returns:
true,if at least one column or one row is selected
Definition at line 557 of file region.cc.
| bool KSpread::Region::isColumnAffected |
( |
uint |
col |
) |
const |
- Parameters:
-
- Returns:
true, if the at least one cell in column col is selected
Definition at line 495 of file region.cc.
| bool KSpread::Region::isRowAffected |
( |
uint |
row |
) |
const |
- Parameters:
-
- Returns:
true, if the at least one cell in row row is selected
Definition at line 510 of file region.cc.
| bool KSpread::Region::contains |
( |
const QPoint & |
point, |
|
|
Sheet * |
sheet = 0 | |
|
) |
| | const |
- Parameters:
-
| point | the point's location |
- Parameters:
-
| sheet | the sheet the point belongs to |
- Returns:
true, if the region contains the point point
Definition at line 573 of file region.cc.
Adds the point point to this region.
- Parameters:
-
| point | the point's location |
| sheet | the sheet the point belongs to |
Definition at line 245 of file region.cc.
Adds the range range to this region.
- Parameters:
-
| range | the range's location |
| sheet | the sheet the range belongs to |
Definition at line 256 of file region.cc.
Adds the region region to this region.
- Parameters:
-
| region | the range's location |
Definition at line 270 of file region.cc.
| void KSpread::Region::sub |
( |
const QPoint & |
point |
) |
|
Substracts the point point from this region.
- Parameters:
-
| point | the point's location |
Definition at line 280 of file region.cc.
| void KSpread::Region::sub |
( |
const QRect & |
range |
) |
|
Substracts the range range from this region.
- Parameters:
-
| range | the range's location |
Definition at line 296 of file region.cc.
| void KSpread::Region::sub |
( |
const Region & |
region |
) |
|
Substracts the region region from this region.
- Parameters:
-
| region | the region to substract |
Definition at line 312 of file region.cc.
- Parameters:
-
| point | the point's location |
- Parameters:
-
| sheet | the sheet the point belongs to |
Reimplemented in KSpread::Selection.
Definition at line 330 of file region.cc.
| void KSpread::Region::clear |
( |
|
) |
[virtual] |
| bool KSpread::Region::operator== |
( |
const Region & |
region |
) |
const |
- Parameters:
-
| region | the region to compare |
- Returns:
true, if this region equals region region
Definition at line 654 of file region.cc.
| void KSpread::Region::operator= |
( |
const Region & |
region |
) |
|
- Parameters:
-
| region | the region to copy |
Definition at line 670 of file region.cc.
| View * KSpread::Region::view |
( |
|
) |
const |
- Returns:
- the view to which this region belongs.
Definition at line 191 of file region.cc.
| void KSpread::Region::setView |
( |
View * |
|
) |
|
Sets the view to which this region belongs.
Definition at line 197 of file region.cc.
| QValueList< Region::Element * > & KSpread::Region::cells |
( |
|
) |
const [protected] |
- Returns:
- the list of elements
Definition at line 649 of file region.cc.
- Parameters:
-
| iterator | the iterator to the element in whose front the new point is inserted |
- Parameters:
-
| point | the location of the point to be inserted |
| multi | true to allow multiple occurences of a point |
- Returns:
- an iterator to the added point or
iterator, if point is not valid or the point is already in the list
Definition at line 396 of file region.cc.
- Parameters:
-
| iterator | the iterator to the element in whose front the new range is inserted |
- Parameters:
-
| range | the location of the range to be inserted |
| multi | true to allow multiple occurences of a range |
- Returns:
- an iterator to the added range or
iterator, if range is not valid or the range is already in the list
Definition at line 449 of file region.cc.
The documentation for this class was generated from the following files:
|